文字列リソースの修正
[修正] strings.xml
[フォルダ] res/values
<resources> <string name="app_name">PracticeApplication</string> <string name="hello_world">Hello world!</string> <string name="action_settings">Settings</string> <string name="title">アンケートフォーム</string> <string name="name">名前</string> <string name="send">送信</string> <string name="hint">名前を入力して下さい</string> </resources>
画面レイアウトファイルの修正
[修正] activity_main.xml
[フォルダ] res/layout
<LinearLayout 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:orientation="vertical" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/title" android:id="@+id/textView" android:textSize="20sp" android:gravity="center" android:background="#4baaff" android:textColor="#ffffff" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/name" android:id="@+id/textView2" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/editText" android:hint="@string/hint" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/send" android:id="@+id/button" /> </LinearLayout>
