Skip to content

Commit

Permalink
Fix App Shortcuts.
Browse files Browse the repository at this point in the history
  • Loading branch information
paolorotolo committed Oct 27, 2016
1 parent b589f89 commit 188e86d
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 15 deletions.
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/add_circle_a1c_shortcut.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/glucosio_fab_HB1AC" />
</shape>
</item>
<item
android:bottom="16dp"
android:drawable="@drawable/ic_add_white_24dp"
android:left="16dp"
android:right="16dp"
android:top="16dp" />


</layer-list>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/add_circle_cholesterol_shortcut.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/glucosio_fab_cholesterol" />
</shape>
</item>
<item
android:bottom="16dp"
android:drawable="@drawable/ic_add_white_24dp"
android:left="16dp"
android:right="16dp"
android:top="16dp" />
</layer-list>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/add_circle_glucose_shortcut.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/glucosio_fab_glucose" />
</shape>
</item>
<item
android:bottom="16dp"
android:drawable="@drawable/ic_add_white_24dp"
android:left="16dp"
android:right="16dp"
android:top="16dp" />
</layer-list>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/add_circle_ketones_shortcut.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/glucosio_fab_ketones" />
</shape>
</item>
<item
android:bottom="16dp"
android:drawable="@drawable/ic_add_white_24dp"
android:left="16dp"
android:right="16dp"
android:top="16dp" />
</layer-list>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/add_circle_pressure_shortcut.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/glucosio_fab_pressure" />
</shape>
</item>
<item
android:bottom="16dp"
android:drawable="@drawable/ic_add_white_24dp"
android:left="16dp"
android:right="16dp"
android:top="16dp" />
</layer-list>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/add_circle_weight_shortcut.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/glucosio_fab_weight" />
</shape>
</item>
<item
android:bottom="16dp"
android:drawable="@drawable/ic_add_white_24dp"
android:left="16dp"
android:right="16dp"
android:top="16dp" />
</layer-list>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_add_white_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FFffffff"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
</vector>
30 changes: 15 additions & 15 deletions app/src/main/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:enabled="true"
android:icon="@drawable/add_circle_glucose"
android:icon="@drawable/add_circle_glucose_shortcut"
android:shortcutDisabledMessage="@string/title_activity_add_glucose"
android:shortcutId="glucose"
android:shortcutLongLabel="@string/title_activity_add_glucose"
android:shortcutShortLabel="@string/title_activity_add_glucose">
android:shortcutLongLabel="@string/fab_glucose"
android:shortcutShortLabel="@string/fab_glucose">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.glucosio.android.activity.AddGlucoseActivity"
android:targetPackage="org.glucosio.android" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/add_circle_weight"
android:shortcutDisabledMessage="@string/title_activity_add_weight"
android:icon="@drawable/add_circle_weight_shortcut"
android:shortcutDisabledMessage="@string/fab_weight"
android:shortcutId="weight"
android:shortcutLongLabel="@string/title_activity_add_weight"
android:shortcutShortLabel="@string/title_activity_add_weight">
android:shortcutLongLabel="@string/fab_weight"
android:shortcutShortLabel="@string/fab_weight">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.glucosio.android.activity.AddWeightActivity"
android:targetPackage="org.glucosio.android" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/add_circle_a1c"
android:shortcutDisabledMessage="@string/title_activity_add_hb1ac"
android:icon="@drawable/add_circle_a1c_shortcut"
android:shortcutDisabledMessage="@string/fab_HB1AC"
android:shortcutId="hb1ac"
android:shortcutLongLabel="@string/title_activity_add_hb1ac"
android:shortcutShortLabel="@string/title_activity_add_hb1ac">
android:shortcutLongLabel="@string/fab_HB1AC"
android:shortcutShortLabel="@string/fab_HB1AC">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.glucosio.android.activity.AddA1CActivity"
android:targetPackage="org.glucosio.android" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/add_circle_pressure"
android:shortcutDisabledMessage="@string/title_activity_add_pressure"
android:icon="@drawable/add_circle_pressure_shortcut"
android:shortcutDisabledMessage="@string/fab_pressure"
android:shortcutId="pressure"
android:shortcutLongLabel="@string/title_activity_add_pressure"
android:shortcutShortLabel="@string/title_activity_add_pressure">
android:shortcutLongLabel="@string/fab_pressure"
android:shortcutShortLabel="@string/fab_pressure">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.glucosio.android.activity.AddPressureActivity"
Expand Down

0 comments on commit 188e86d

Please sign in to comment.