【发布时间】:2017-04-24 00:21:06
【问题描述】:
我需要将颜色存储在 sqllite 数据库中,并让用户选择他们想要的字体颜色。
颜色将显示在滚动视图中,类似于显示图标选择。
如何以这种方式向用户显示颜色?
<LinearLayout
android:layout_width="200dp"
android:layout_height="50dp"
android:orientation="horizontal"
android:layout_marginRight="73dp"
android:layout_marginEnd="73dp"
android:layout_below="@+id/btnCreateAccount"
android:layout_alignRight="@+id/btnCreateAccount"
android:layout_alignEnd="@+id/btnCreateAccount">
<ImageView
android:layout_width="50sp"
android:layout_height="50sp"
android:src="@mipmap/color1"
android:id="@+id/imgView1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/color2"
android:id="@+id/imgView2"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/color3"
android:id="@+id/imgView3"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/color4"
android:id="@+id/imgView4"/>
</LinearLayout>
我认为颜色会显示为图像或图标,并且选择将添加到数据库中的用户文件中?
【问题讨论】:
-
我不太确定你在问什么。您发布的代码似乎与您描述的完全不同。
标签: android sqlite listview colors