Android プロパティメモ 〜TextViewのプロパティ〜

Androidアプリの作成を行うのに、まとまっていた方が便利かな?と思い、TextViewのプロパティをまとめていきます。

今後も更新していきます。

TextViewのプロパティ=大きさとか位置とかを設定する項目名です。

XMLとプログラムコードの両方で設定ができます。参考にするサイトはこちらデベロッパサイトです。

TextViewプロパティ

layoutに関して

fill_parent: ドロップダウンは画面の高さに合うはずです。この定数は、APIレベル8以降では非推奨であり、match_parentに置き換えられています。

match_parent
ドロップダウンは画面の高さに合うはずです。 APIレベル8で導入されました。

wrap_content
ドロップダウンはコンテンツの高さに合わせてください。

主に使用するのは「match_parent」「wrap_content」のようです。

ちょっといじって見ました。

ConstraintLayout

参照先はこちら


code>app:layout_constraintLeft_toRightOf="@+id/buttonA"

layout_constraintLeft_toLeftOf
layout_constraintLeft_toRightOf
layout_constraintRight_toLeftOf
layout_constraintRight_toRightOf
layout_constraintTop_toTopOf
layout_constraintTop_toBottomOf
layout_constraintBottom_toTopOf
layout_constraintBottom_toBottomOf
layout_constraintBaseline_toBaselineOf
layout_constraintStart_toEndOf
layout_constraintStart_toStartOf
layout_constraintEnd_toStartOf
layout_constraintEnd_toEndOf


app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent
android:layout_marginStart
android:layout_marginEnd
android:layout_marginLeft
android:layout_marginTop
android:layout_marginRight
android:layout_marginBottom
layout_constraintHorizontal_bias
layout_constraintVertical_bias

app:layout_constraintHorizontal_bias="0.3"
                 app:layout_constraintLeft_toLeftOf="parent"
                 app:layout_constraintRight_toRightOf="parent

でわでわ。。。



コメントを残す