Skip to content

Commit ea6d2ce

Browse files
author
Paolo Rotolo
committed
Fix incorrectly displayed vector drawables on < Lollipop.
1 parent da0d483 commit ea6d2ce

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ android {
3434
defaultConfig {
3535
minSdkVersion 16
3636
targetSdkVersion 25
37-
versionCode 39
38-
versionName '1.3.1'
37+
versionCode 40
38+
versionName '1.3.2'
3939
applicationId 'org.glucosio.android'
4040

4141
vectorDrawables.useSupportLibrary = true

app/src/main/java/org/glucosio/android/activity/MainActivity.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import android.support.design.widget.CoordinatorLayout;
3838
import android.support.design.widget.Snackbar;
3939
import android.support.design.widget.TabLayout;
40+
import android.support.graphics.drawable.VectorDrawableCompat;
4041
import android.support.v4.view.ViewPager;
4142
import android.support.v7.app.AlertDialog;
4243
import android.support.v7.app.AppCompatActivity;
@@ -168,14 +169,14 @@ public void onClick(View view) {
168169
bottomSheetAddDialog = new BottomSheetDialog(this);
169170

170171
// Add Nav Drawer
171-
final PrimaryDrawerItem itemSettings = new PrimaryDrawerItem().withName(R.string.action_settings).withIcon(R.drawable.ic_settings_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
172-
final PrimaryDrawerItem itemExport = new PrimaryDrawerItem().withName(R.string.sidebar_backup_export).withIcon(R.drawable.ic_backup_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
173-
final PrimaryDrawerItem itemFeedback = new PrimaryDrawerItem().withName(R.string.menu_support).withIcon(R.drawable.ic_announcement_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
174-
final PrimaryDrawerItem itemAbout = new PrimaryDrawerItem().withName(R.string.preferences_about_glucosio).withIcon(R.drawable.ic_info_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
175-
final PrimaryDrawerItem itemInvite = new PrimaryDrawerItem().withName(R.string.action_invite).withIcon(R.drawable.ic_face_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
176-
final PrimaryDrawerItem itemDonate = new PrimaryDrawerItem().withName(R.string.about_donate).withIcon(R.drawable.ic_favorite_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
177-
final PrimaryDrawerItem itemA1C = new PrimaryDrawerItem().withName(R.string.activity_converter_title).withIcon(R.drawable.ic_calculator_a1c_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
178-
final PrimaryDrawerItem itemReminders = new PrimaryDrawerItem().withName(R.string.activity_reminders_title).withIcon(R.drawable.ic_alarm_grey_24dp).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
172+
final PrimaryDrawerItem itemSettings = new PrimaryDrawerItem().withName(R.string.action_settings).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_settings_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
173+
final PrimaryDrawerItem itemExport = new PrimaryDrawerItem().withName(R.string.sidebar_backup_export).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_backup_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
174+
final PrimaryDrawerItem itemFeedback = new PrimaryDrawerItem().withName(R.string.menu_support).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_announcement_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
175+
final PrimaryDrawerItem itemAbout = new PrimaryDrawerItem().withName(R.string.preferences_about_glucosio).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_info_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
176+
final PrimaryDrawerItem itemInvite = new PrimaryDrawerItem().withName(R.string.action_invite).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_face_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
177+
final PrimaryDrawerItem itemDonate = new PrimaryDrawerItem().withName(R.string.about_donate).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_favorite_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
178+
final PrimaryDrawerItem itemA1C = new PrimaryDrawerItem().withName(R.string.activity_converter_title).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_calculator_a1c_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
179+
final PrimaryDrawerItem itemReminders = new PrimaryDrawerItem().withName(R.string.activity_reminders_title).withIcon(VectorDrawableCompat.create(getResources(), R.drawable.ic_alarm_grey_24dp, null)).withSelectable(false).withTypeface(Typeface.DEFAULT_BOLD);
179180

180181
DrawerBuilder drawerBuilder = new DrawerBuilder()
181182
.withActivity(this)

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
<string name="preferences_about">About</string>
160160
<string name="preferences_experimental_title" translatable="false">Here be dragons :/</string>
161161
<string name="preferences_experimental">These features are experimental and may not fully work and are for early testing by users. Remember that you can shake your phone to send us feedback.</string>
162-
<string name="version" translatable="false">1.3.1 (Chutney)</string>
162+
<string name="version" translatable="false">1.3.2 (Chutney)</string>
163163
<string name="preferences_version">Version</string>
164164
<string name="preferences_coming_soon">Coming soon...</string>
165165
<string name="preferences_terms">Terms of use</string>

wear/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ android {
2929
applicationId "org.glucosio.android"
3030
minSdkVersion 21
3131
targetSdkVersion 25
32-
versionCode 39
33-
versionName '1.3.1'
32+
versionCode 40
33+
versionName '1.3.2'
3434
}
3535
buildTypes {
3636
debug {

0 commit comments

Comments
 (0)