文字列リソースファイルで宣言された単純な文字列配列をリストビューに表示したい。私のデバイスでアプリをテストすると、すべてうまく動作します。しかし、アンドロイドスタジオのデザインビューでは、私は文字列リソースファイルの値ではないと思ういくつかのデフォルト値を取得します。デザインビューにリストビューの文字列配列の値が反映されない
これが不具合か、バグか、ここで何か間違っているのですか?
のstrings.xml
<resources>
<string name="app_name">Starbuzz</string>
<string name="starbuzz_logo">Starbuzz logo</string>
<string-array name="options">
<item>Drinks</item>
<item>Food</item>
<item>Stores</item>
</string-array>
</resources>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.hfad.starbuzz.MainActivity">
<ImageView
android:layout_width="200dp"
android:layout_height="100dp"
android:src="@drawable/starbuzz_logo"
android:contentDescription="@string/starbuzz_logo"/>
<ListView
android:id="@+id/list_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/options">
</ListView>
</LinearLayout>
アンドロイドデザインルールの場合、そのリストビューはレンダリングされません。誰も私にそれがなぜそうであるかを教えてもらえますか? –