【问题标题】:Removing shadow from card layout从卡片布局中移除阴影
【发布时间】:2015-03-24 05:21:21
【问题描述】:

我想通过设置android:background="@android:drawable/dialog_holo_light_frame"从我使用的默认卡片布局中删除阴影。我该怎么做?

<com.etsy.android.grid.StaggeredGridView
        android:numColumns="3"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:gravity="center"
        android:background="@android:drawable/dialog_holo_light_frame"

        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/searchtext"
        app:item_margin="8dp"
        android:id="@+id/gridgip"

        />

【问题讨论】:

  • 你的卡片布局在哪里?
  • @Harry android:background="@android:drawable/dialog_holo_light_frame" 创建默认卡片背景..我想从中删除阴影
  • 您是否将背景分配给整个网格视图或其 itmes?而且你不能修改android的默认drawables!创建你自己的。

标签: android shadow cardlayout


【解决方案1】:

不要使用该背景,请使用您自己的颜色背景。只需删除代码并提供一些颜色代码,如下所示:

android:background = "FF0000" //this is for RED color

通过输入十六进制颜色代码来使用您的自定义颜色。 请点击此链接:http://html-color-codes.info/

【讨论】:

    猜你喜欢
    • 2017-09-08
    • 2012-01-18
    • 2016-09-16
    • 1970-01-01
    • 2015-06-12
    • 2013-10-01
    • 1970-01-01
    • 2017-05-30
    • 1970-01-01
    相关资源
    最近更新 更多