Skip to content

Commit

Permalink
Fixes #2244 : The project tagline should always fit on one line (#2259)
Browse files Browse the repository at this point in the history
  • Loading branch information
balaji-ramavathu authored and teolemon committed Feb 22, 2019
1 parent 60c0bab commit 0aa9f2f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
16 changes: 11 additions & 5 deletions app/src/main/res/layout-v26/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_openfacts_logo_no_tagline" />

<TextView
<android.support.v7.widget.AppCompatTextView
android:id="@+id/taglineHome"
android:layout_width="184dp"
android:layout_height="32dp"
android:layout_height="30dp"
android:gravity="center_horizontal"
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:autoSizeTextType="uniform"
app:autoSizeMaxTextSize="28sp"
app:autoSizeMinTextSize="12sp"
app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform"
android:contentDescription="@string/OFFlogo"
android:gravity="center_horizontal"
android:text="@string/tagline"
android:textStyle="bold" />
app:layout_constraintEnd_toEndOf="@id/imageHome"
app:layout_constraintStart_toStartOf="@id/imageHome"
app:layout_constraintTop_toBottomOf="@id/imageHome" />

<TextView
android:id="@+id/textHome"
Expand Down
16 changes: 11 additions & 5 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_openfacts_logo_no_tagline" />

<TextView
<android.support.v7.widget.AppCompatTextView
android:id="@+id/taglineHome"
android:layout_width="184dp"
android:layout_height="32dp"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/OFFlogo"
android:layout_height="30dp"
android:gravity="center_horizontal"
android:textStyle="bold"
app:autoSizeMaxTextSize="28sp"
app:autoSizeMinTextSize="12sp"
app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform"
android:contentDescription="@string/OFFlogo"
android:text="@string/tagline"
android:textStyle="bold" />
app:layout_constraintEnd_toEndOf="@id/imageHome"
app:layout_constraintStart_toStartOf="@id/imageHome"
app:layout_constraintTop_toBottomOf="@id/imageHome" />

<TextView
android:id="@+id/textHome"
Expand Down

0 comments on commit 0aa9f2f

Please sign in to comment.