現在、タスク入力画面を作成しています。
タイトル・カテゴリー・内容のエディターを表示させたいのですが、タイトルのエディターが表示されません。
コードは現在こんな感じです。
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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:paddingBottom="16dp" android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingTop="16dp" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="jp.techacademy.kazutaka.fuse.taskapp.InputActivity" tools:showIn="@layout/activity_input"> <EditText android:id="@+id/title_edit_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="タイトル" /> <EditText android:id="@+id/category_edit_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/title_edit_text" android:hint="カテゴリー" /> <EditText android:id="@+id/content_edit_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/category_edit_text" android:hint="内容" /> <Button android:id="@+id/date_button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_below="@id/content_edit_text" android:layout_alignParentStart="true" android:layout_toLeftOf="@+id/times_button" android:text="----/--/--" style="@style/Widget.AppCompat.Button.Borderless" /> <Button android:id="@id/times_button" android:layout_width="96dp" android:layout_height="wrap_content" android:layout_below="@id/content_edit_text" android:layout_alignParentRight="true" android:text="--:--" style="@style/Widget.AppCompat.Button.Borderless" /> <Button android:id="@+id/done_button" android:layout_width="96dp" android:layout_height="wrap_content" android:layout_below="@id/times_button" android:layout_alignParentRight="true" android:text="決定" /> </RelativeLayout>
RelativeLayoutなので、タイトルのエディターをandroid:layout_alignParentTop = "true"
に設定してもダメでした。
これ以上思いつかないので、何か方法はありませんか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/12/30 00:59