私は次のことをしようとしています:
今のところ、NativeAndroid を使用しようとしています。
ただし、HTML と css でこれを行うことができます。
ご覧のとおり、次のようなものです。
- 背景が青色のホルダー (他の色または IMAGE の可能性もあります)
- (透明??)色のTextView
- 背景が灰色の TextView
ただし、背景を灰色に設定し、テキストを透明に設定すると、テキストが「消え」、すべて灰色で表示されます。
これは私の試みです(ネイティブAndroid):
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ff000000" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffcecece"
android:padding="5dp"
android:text="@string/hello_world"
android:textColor="#00ffffff" />
</RelativeLayout>
ただし、次のことを示しています。
テキストがありますが、透明なので表示されません。
だから私の質問は:
- どうすればこれを達成できますか?
- キャンバス?スパン?私はそれらのアプローチに慣れていないので、いくつかの指示をいただければ幸いです。
ありがとう!!
編集: その青い背景は動的でなければならず、IMAGE である可能性があります!