mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-04-02 06:42:47 -04:00
Fix long barcode values causing barcode to scale down to nothing
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
- Long-press card icon in view activity to change it
|
||||
- Improve button styling in Groups screen
|
||||
- Fix long barcode values causing barcode to scale down to nothing
|
||||
|
||||
## v2.23.1 - 121
|
||||
|
||||
|
||||
@@ -605,6 +605,16 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
|
||||
|
||||
binding.cardIdView.setText(loyaltyCard.cardId);
|
||||
|
||||
// Display full text on click in case it doesn't fit in a single line
|
||||
binding.cardIdView.setOnClickListener(v -> {
|
||||
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(LoyaltyCardViewActivity.this);
|
||||
builder.setTitle(R.string.barcodeId);
|
||||
builder.setMessage(loyaltyCard.cardId);
|
||||
builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> dialogInterface.dismiss());
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
});
|
||||
|
||||
int backgroundHeaderColor;
|
||||
if (loyaltyCard.headerColor != null) {
|
||||
backgroundHeaderColor = loyaltyCard.headerColor;
|
||||
|
||||
@@ -125,6 +125,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/text_size_large"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
Reference in New Issue
Block a user