我想删除RecyclerView项目之间的分隔符(空格)
因此,尝试设置background项目视图和RecyclerView到White,但它不工作怎么解决?
物品查看XML:
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@android:color/white"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:background="@android:color/white"
android:paddingLeft="@dimen/footer_item_padding"
android:paddingRight="@dimen/footer_item_padding"
android:orientation="vertical"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageView
android:id="@+id/img_avatar_category_item_adapter"
android:contentDescription="@string/app_name"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:layout_width="@dimen/image_width_category_adapter"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v7.widget.CardView>
Run Code Online (Sandbox Code Playgroud)
活动XML:
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_categories_main_activity"
android:background="@android:color/white"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Run Code Online (Sandbox Code Playgroud)
Activity 课程:
rv_categories.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
rv_categories.setItemAnimator(new DefaultItemAnimator());
Run Code Online (Sandbox Code Playgroud)
我正在制作一个基本的启动器应用程序,在其中我需要通知栏和状态栏完全透明。所以我用下面的代码。
Window w = getWindow(); // in Activity's onCreate() for instance
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
Run Code Online (Sandbox Code Playgroud)
可以做到这一点,但是功能键的颜色不是白色,如下图所示。
我如何使它变白?
我可以使用Fresco图像库从URL显示图像,如其网站所示 -
Uri u = Uri.parse("https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png");
SimpleDraweeView draweeView = (SimpleDraweeView) findViewById(R.id.my_image_view);
draweeView.setImageURI(u);
Run Code Online (Sandbox Code Playgroud)
如何使用Fresco显示SD卡中的图像?