Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70c6ee17cd | ||
|
|
c233f82dc1 | ||
|
|
be0c2507f2 | ||
|
|
abfcf9d6cd | ||
|
|
4d565b3b2f | ||
|
|
27511a4ccd | ||
|
|
12440346fa | ||
|
|
870e4d0c4a | ||
|
|
6e526de087 | ||
|
|
891636b51f | ||
|
|
017d97d08c | ||
|
|
63165ca1a5 | ||
|
|
48f40a51d1 | ||
|
|
3940ba5756 |
@@ -1,3 +1,9 @@
|
||||
## v0.19 (2018-02-01)
|
||||
|
||||
Changes:
|
||||
- Improved layout for card list. (https://github.com/brarcher/loyalty-card-locker/pull/188)
|
||||
- Improved layout when viewing a card. (https://github.com/brarcher/loyalty-card-locker/pull/190)
|
||||
|
||||
## v0.18.1 (2018-01-24)
|
||||
|
||||
Changes:
|
||||
|
||||
@@ -13,8 +13,8 @@ android {
|
||||
applicationId "protect.card_locker"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 27
|
||||
versionCode 21
|
||||
versionName "0.19"
|
||||
versionCode 22
|
||||
versionName "0.20"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -27,6 +27,7 @@ android {
|
||||
disable "ButtonStyle"
|
||||
disable "AlwaysShowAction"
|
||||
disable "MissingTranslation"
|
||||
disable "MissingPrefix"
|
||||
}
|
||||
|
||||
// Starting with Android Studio 3 Robolectric is unable to find resources.
|
||||
@@ -45,9 +46,11 @@ 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'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
compile group: 'com.google.guava', name: 'guava', version: '20.0'
|
||||
compile 'com.github.apl-devs:appintro:v4.2.0'
|
||||
testCompile 'junit:junit:4.12'
|
||||
|
||||
@@ -33,8 +33,10 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
private static final String TAG = "CardLocker";
|
||||
|
||||
TextView cardIdFieldView;
|
||||
TextView noteView;
|
||||
View noteViewDivider;
|
||||
TextView storeName;
|
||||
ImageView barcodeImage;
|
||||
ImageView storeLogo;
|
||||
View collapsingToolbarLayout;
|
||||
int loyaltyCardId;
|
||||
boolean rotationEnabled;
|
||||
@@ -67,8 +69,10 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
db = new DBHelper(this);
|
||||
|
||||
cardIdFieldView = findViewById(R.id.cardIdView);
|
||||
noteView = findViewById(R.id.noteView);
|
||||
noteViewDivider = findViewById(R.id.noteViewDivider);
|
||||
storeName = findViewById(R.id.storeName);
|
||||
barcodeImage = findViewById(R.id.barcode);
|
||||
storeLogo = findViewById(R.id.storeLogo);
|
||||
collapsingToolbarLayout = findViewById(R.id.collapsingToolbarLayout);
|
||||
}
|
||||
|
||||
@@ -112,10 +116,21 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
|
||||
cardIdFieldView.setText(loyaltyCard.cardId);
|
||||
|
||||
if(loyaltyCard.note.length() > 0)
|
||||
{
|
||||
noteView.setText(loyaltyCard.note);
|
||||
}
|
||||
else
|
||||
{
|
||||
noteView.setVisibility(View.GONE);
|
||||
noteViewDivider.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
storeName.setText(loyaltyCard.store);
|
||||
|
||||
int cardViewLetterFontSize = getResources().getDimensionPixelSize(R.dimen.cardViewLetterFontSize);
|
||||
int pixelSize = getResources().getDimensionPixelSize(R.dimen.cardThumbnailSizeLarge);
|
||||
LetterBitmap letterBitmap = new LetterBitmap(this, loyaltyCard.store, loyaltyCard.store, cardViewLetterFontSize, pixelSize, pixelSize);
|
||||
storeLogo.setImageBitmap(letterBitmap.getLetterTile());
|
||||
collapsingToolbarLayout.setBackgroundColor(letterBitmap.getBackgroundColor());
|
||||
|
||||
if(barcodeImage.getHeight() == 0)
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 46 KiB |
@@ -15,35 +15,75 @@
|
||||
android:layout_height="fill_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/centerGuideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/barcode"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0.0px"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="20.0dip"
|
||||
android:layout_marginBottom="10.0dip"
|
||||
android:layout_weight="0.1"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:layout_constraintBottom_toTopOf="@+id/centerGuideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:contentDescription="@string/barcodeImageDescription"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cardIdView"
|
||||
android:textSize="42.0sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10.0dip"
|
||||
android:layout_marginRight="10.0dip"
|
||||
android:maxLines="1"
|
||||
android:layout_weight="0.1"
|
||||
app:layout_constraintTop_toBottomOf="@id/centerGuideline"
|
||||
app:layout_constraintBottom_toTopOf="@+id/noteViewDivider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textAlignment="center"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="@dimen/singleCardCardIdTextSizeMin"
|
||||
app:autoSizeMaxTextSize="@dimen/singleCardCardIdTextSizeMax"
|
||||
android:ellipsize="end"
|
||||
android:text="1234567890"/>
|
||||
android:textIsSelectable="true"/>
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@id/noteViewDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@android:color/black"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardIdView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/noteView"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10.0dip"
|
||||
android:ellipsize="end"
|
||||
android:layout_gravity="bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/noteViewDivider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="@dimen/singleCardNoteTextSizeMin"
|
||||
app:autoSizeMaxTextSize="@dimen/singleCardNoteTextSizeMax"
|
||||
android:textIsSelectable="true"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/drop_shadow_actionbar"
|
||||
@@ -73,10 +113,16 @@
|
||||
app:expandedTitleMarginEnd="64dp"
|
||||
app:contentScrim="?colorPrimary"
|
||||
app:expandedTitleGravity="top">
|
||||
<ImageView
|
||||
android:id="@+id/storeLogo"
|
||||
<TextView
|
||||
android:id="@+id/storeName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="40sp"
|
||||
android:textAlignment="center"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="?actionBarSize"
|
||||
app:layout_collapseMode="parallax"
|
||||
android:fitsSystemWindows="true"/>
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
<dimen name="storeNameTextSize">28sp</dimen>
|
||||
<dimen name="noteTextSize">14sp</dimen>
|
||||
|
||||
<dimen name="singleCardCardIdTextSizeMin">15sp</dimen>
|
||||
<dimen name="singleCardCardIdTextSizeMax">50sp</dimen>
|
||||
<dimen name="singleCardNoteTextSizeMin">25sp</dimen>
|
||||
<dimen name="singleCardNoteTextSizeMax">50sp</dimen>
|
||||
|
||||
<dimen name="inputBorderThickness">2dip</dimen>
|
||||
<dimen name="inputBorderDividerThickness">4dip</dimen>
|
||||
<dimen name="inputPadding">20dip</dimen>
|
||||
|
||||
BIN
metadata/en-US/images/featureGraphic.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 62 KiB |