分类目录归档:android

scrollView.setOnScrollChangeListener

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    scrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
        @Override
        public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
            Log.i("iTag.scrollY", String.valueOf(scrollY));
            Log.i("iTag.oldScrollY", String.valueOf(oldScrollY));
            if (scrollY < 0 && oldScrollY < 0) {
                textView.setText("");
                doGet();
            }
        }
    });
}

android去除标题栏

跟踪

android:theme="@style/AppTheme"

进入修改style.xml文件,这里还可以修改颜色,还可以全屏

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
        <!-- Customize your theme here. -->
        <!--<item name="colorPrimary">@color/colorPrimary</item>-->
        <!--<item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
        <!--<item name="colorAccent">@color/colorAccent</item>-->
        <item name="android:windowFullscreen">true</item>
    </style>

</resources>