Compare commits

...

14 Commits
v0.19 ... v0.20

Author SHA1 Message Date
Branden Archer
70c6ee17cd Merge pull request #198 from brarcher/pre-v0.20
Update for v0.20
2018-02-10 22:02:04 -05:00
Branden Archer
c233f82dc1 Update for v0.20 2018-02-10 13:50:30 -05:00
Branden Archer
be0c2507f2 Merge pull request #197 from brarcher/layout-changes
Layout changes for new card view layout
2018-02-10 13:49:22 -05:00
Branden Archer
abfcf9d6cd Disable MissingPrefix lint
The autosizing TextView, which comes from the support-v4 library,
adds several new attributes to TextViews. These attributes do not
seem to be in the app namespace (as described in the documentation),
as Android Studio and lint complains. However, funtionally the new
attributes work as expected.
2018-02-10 13:43:28 -05:00
Branden Archer
4d565b3b2f Update screenshots and wizard images 2018-02-10 13:37:17 -05:00
Branden Archer
27511a4ccd Make card id and note text selectable 2018-02-10 13:37:17 -05:00
Branden Archer
12440346fa Replace letter icon with store name 2018-02-10 13:37:17 -05:00
Branden Archer
870e4d0c4a Add note text to card view layout 2018-02-10 13:37:17 -05:00
Branden Archer
6e526de087 Auto-size card id text on card view layout 2018-02-10 13:37:16 -05:00
Branden Archer
891636b51f Use ConstraintLayout for card view layout
This way the size of the barcode can be 1/2 the screen.
2018-02-10 13:37:16 -05:00
Branden Archer
017d97d08c Merge pull request #196 from brarcher/feature-graphic
add feature graphic to metadata
2018-02-09 23:30:09 -05:00
Branden Archer
63165ca1a5 add feature graphic to metadata 2018-02-09 23:21:46 -05:00
Branden Archer
48f40a51d1 Merge pull request #192 from brarcher/brarcher-patch-1
Update CHANGELOG
2018-02-01 08:13:51 -05:00
Branden Archer
3940ba5756 Update CHANGELOG 2018-02-01 08:05:10 -05:00
13 changed files with 94 additions and 19 deletions

View File

@@ -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:

View File

@@ -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'

View File

@@ -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)

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -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"/>

View File

@@ -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>

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 62 KiB