0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Androidアプリ開発勉強】開発時にハマったこと(XAMLでデザイン編その2)

Last updated at Posted at 2018-08-22

前回に引き続き、
画面のレイアウト系のハマったところの備忘録です。
やっぱり触るといろいろ出てくるので、
このシリーズはまだ続くかも…。

前提環境(バージョンとか)

Android Studio Version 3.1.4
Windows 10 HOME Version 1803, OS build 17134.228

ハマったこと

TextInputEditTextが改行しちゃう

以下の設定を入れると改行できなくなる。
ただし、画面より長い量を入力すると改行したように見える。
android:maxLines="1"

また以下のようにするという記事も見たが、
自分は解決しなかった。

android:scrollHorizontally="true" android:ellipsize="start"

カーソルとか下線がピンクになる

この記事の機種によっての部分に、まさに当てはまって悩んでいた。
解決出来たのはこの記事のおかげ多謝。

自分は結果的にこうした。
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/default_color"
android:foregroundTint="@color/default_color"
android:textCursorDrawable="@drawable/shape_cursor" />

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?