Androidのウェアフリーアプリを開発し、テキストを画像にオーバーレイしようとしています。 main_activity.xmlでAndroidウェアアプリに画像を追加する - 初心者
私が持っている:
<ImageView
android:id="@+id/myImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher1.png" />
<TextView
android:id="@+id/myImageViewText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/myImageView"
android:layout_alignTop="@id/myImageView"
android:layout_alignRight="@id/myImageView"
android:layout_alignBottom="@id/myImageView"
android:layout_margin="1dp"
android:gravity="center"
android:text="Hello"
android:textColor="#000000" />
アンドロイドスタジオだからcannot resolve symbol @drawable/ic_launcher1.png
私はフォルダ内のrefs.xml
を生成する修正すると文句を言いvalues
refs.xml内容:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="ic_launcher1.png">test</drawable>
</resources>
ここで、d o画像を追加するic_launcher1.png
?
あなたは答えのいずれかをチェックした.pngを使用していけませんか? – gmetax