0
我需要将颜色存储在sqllite数据库中,并让用户选择他们想要的字体颜色。
颜色将显示在滚动视图中,类似于显示图标选择。 如何以这种方式向用户显示颜色?需要允许用户从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>
我会认为颜色会显示为图像或图标,选择将被添加到数据库中的用户文件?
我不太清楚你在问什么。您发布的代码似乎与您所描述的完全不同。 – nasch