###前提・実現したいこと
Android studio画面上にtextViewを用いて「こんにちは」等の日本語を表示する
###発生している問題・エラーメッセージ
Android studioでtextViewを設置し、text欄にResourcesの追加からkeyに「hello」、Default Valueに「こんにちは」と設定し、「@string/hello」を記入したのですが、Designエディターの画面上で全く文字が表示されません。ほかの日本語文字で試しても同じ状況でしたので、日本語文字を表示させるのに何か設定ができてないんじゃないかと思いました。これを解決する方法が何かあれば教えていただきたいです。
###該当のソースコード
activity_main.xml
<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout 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"
tools:context="com.example.myapplication.MainActivity">
<TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:text="@string/hello" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
strings.xml
<resources> <string name="app_name">My Application</string> <string name="hello">こんにちは</string> </resources>###試したこと
課題に対してアプローチしたことを記載してください
###補足情報(言語/FW/ツール等のバージョンなど)
Android studio 3.0
回答1件
あなたの回答
tips
プレビュー