Last active
September 10, 2017 22:56
-
-
Save mlagerberg/80008edd31541fa720b2 to your computer and use it in GitHub Desktop.
[Google Now shortcut] Add Android app as a replacement for the Google Now shortcut (swipe up on home button) #android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity ... > | |
<intent-filter> | |
<action android:name="android.intent.action.ASSIST"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
</intent-filter> | |
<meta-data | |
android:name="com.android.systemui.action_assist_icon" | |
android:resource="@drawable/ic_assist" | |
/> | |
</activity> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item | |
android:state_enabled="true" | |
android:state_active="false" | |
android:state_focused="false" | |
android:drawable="@drawable/ic_assist_normal" | |
/> | |
<item | |
android:state_enabled="true" | |
android:state_active="true" | |
android:state_focused="false" | |
android:drawable="@drawable/ic_assist_active" | |
/> | |
<item | |
android:state_enabled="true" | |
android:state_active="false" | |
android:state_focused="true" | |
android:drawable="@drawable/ic_assist_active" | |
/> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ic_assist_normal
andic_assist_active
should be 75x75 dp large.It looks best to have an all-white icon on a transparent background for 'normal' and a transparent icon on a circular white background for 'active'. Be sure to add a shadow to both images in case they appear on a white background. On Lollipop there's always a white (circular) background behind the icon and only the 'normal' is used.