質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Q&A

解決済

1回答

728閲覧

タスク入力画面のタイトルが表示されません

begin1990

総合スコア31

Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

0グッド

0クリップ

投稿2017/12/29 13:47

現在、タスク入力画面を作成しています。

タイトル・カテゴリー・内容のエディターを表示させたいのですが、タイトルのエディターが表示されません。

イメージ説明

コードは現在こんな感じです。

<?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"に設定してもダメでした。

これ以上思いつかないので、何か方法はありませんか?

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

おそらくアクションバーの裏に入っています。layout_marginTopに適当な値を設定して確認してください。

投稿2017/12/29 18:30

yona

総合スコア18155

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

begin1990

2017/12/30 00:59

android:paddingTop="16dp"だったのを、64dpにしたら上手くできました。 ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問