mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-02-18 15:18:37 -05:00
Auto-size card id text on card view layout
This commit is contained in:
@@ -45,6 +45,7 @@ dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:27.0.2'
|
||||
compile 'com.android.support:design:27.0.2'
|
||||
compile 'com.android.support:support-v4:27.0.2'
|
||||
compile 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
|
||||
compile 'com.google.zxing:core:3.3.0'
|
||||
compile 'org.apache.commons:commons-csv:1.5'
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cardIdView"
|
||||
android:textSize="42.0sp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10.0dip"
|
||||
@@ -49,11 +48,11 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/centerGuideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:maxLines="1"
|
||||
android:layout_weight="0.1"
|
||||
android:textAlignment="center"
|
||||
android:ellipsize="end"
|
||||
android:text="1234567890"/>
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="@dimen/singleCardCardIdTextSizeMin"
|
||||
app:autoSizeMaxTextSize="@dimen/singleCardCardIdTextSizeMax"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<dimen name="storeNameTextSize">28sp</dimen>
|
||||
<dimen name="noteTextSize">14sp</dimen>
|
||||
|
||||
<dimen name="singleCardCardIdTextSizeMin">15sp</dimen>
|
||||
<dimen name="singleCardCardIdTextSizeMax">50sp</dimen>
|
||||
<dimen name="inputBorderThickness">2dip</dimen>
|
||||
<dimen name="inputBorderDividerThickness">4dip</dimen>
|
||||
<dimen name="inputPadding">20dip</dimen>
|
||||
|
||||
Reference in New Issue
Block a user