Fix padding

This commit is contained in:
Hemanth S 2020-05-21 05:25:28 +05:30
parent 021e98d044
commit 4275b12603
5 changed files with 91 additions and 94 deletions

View file

@ -34,34 +34,33 @@
tools:ignore="ContentDescription" tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" /> tools:src="@tools:sample/avatars" />
<LinearLayout
<com.google.android.material.textview.MaterialTextView android:layout_width="match_parent"
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="8dp" android:gravity="center_vertical"
android:paddingTop="8dp" android:orientation="vertical"
android:paddingBottom="4dp" android:padding="12dp"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image" app:layout_constraintTop_toBottomOf="@id/image">
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/text" android:id="@+id/title"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="8dp" android:singleLine="true"
android:paddingBottom="8dp" android:textAppearance="@style/TextViewSubtitle1"
android:singleLine="true" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" tools:text="@tools:sample/full_names"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@tools:sample/full_names"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</FrameLayout> </FrameLayout>

View file

@ -34,33 +34,33 @@
tools:src="@tools:sample/avatars" /> tools:src="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView <LinearLayout
android:id="@+id/title" android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="8dp" android:gravity="center_vertical"
android:paddingTop="8dp" android:orientation="vertical"
android:paddingBottom="4dp" android:padding="12dp"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image" app:layout_constraintTop_toBottomOf="@id/image">
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/text" android:id="@+id/title"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="8dp" android:singleLine="true"
android:paddingBottom="8dp" android:textAppearance="@style/TextViewSubtitle1"
android:singleLine="true" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" tools:text="@tools:sample/full_names" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@tools:sample/full_names" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</FrameLayout> </FrameLayout>

View file

@ -32,34 +32,33 @@
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView <LinearLayout
android:id="@+id/title" android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:gravity="center_vertical"
android:paddingHorizontal="8dp" android:orientation="vertical"
android:paddingTop="8dp" android:padding="12dp"
android:paddingBottom="4dp"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/imageContainer" app:layout_constraintTop_toBottomOf="@id/imageContainer">
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/text" android:id="@+id/title"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="8dp" android:singleLine="true"
android:paddingBottom="8dp" android:textAppearance="@style/TextViewSubtitle1"
android:singleLine="true" android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary" tools:text="@tools:sample/full_names" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" <com.google.android.material.textview.MaterialTextView
app:layout_constraintTop_toBottomOf="@id/title" android:id="@+id/text"
tools:text="@tools:sample/lorem/random" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@tools:sample/full_names" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -25,34 +25,34 @@
tools:src="@tools:sample/avatars" /> tools:src="@tools:sample/avatars" />
<com.google.android.material.textview.MaterialTextView <LinearLayout
android:id="@+id/title" android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="12dp"
android:gravity="center" android:gravity="center"
android:maxLines="2"
android:paddingTop="8dp"
android:paddingBottom="4dp"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image" app:layout_constraintTop_toBottomOf="@id/image">
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/text" android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:paddingHorizontal="8dp" android:singleLine="true"
android:paddingBottom="8dp" android:textAppearance="@style/TextViewSubtitle1"
android:singleLine="true" android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary" tools:text="@tools:sample/full_names" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" <com.google.android.material.textview.MaterialTextView
app:layout_constraintTop_toBottomOf="@id/title" android:id="@+id/text"
tools:text="@tools:sample/lorem/random" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@tools:sample/full_names" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -51,5 +51,4 @@
android:textColor="@color/md_white_1000" android:textColor="@color/md_white_1000"
tools:text="@tools:sample/full_names" /> tools:text="@tools:sample/full_names" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
-
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>