Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid TaskStackBuilder and toolbar icon blink
    primarykey
    data
    text
    <p>My code of notification:</p> <pre><code>NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle(getResources().getString(R.string.app_name)) .setContentText("test") .setAutoCancel(true) .setTicker("Powiadomienie: test"); TaskStackBuilder stackBuilder = TaskStackBuilder.create(this); Intent ia = new Intent(this, ActivityA.class); Intent ib = new Intent(this, ActivityB.class); Intent ic = new Intent(this, ActivityC.class); stackBuilder.addNextIntent(ia); stackBuilder.addNextIntent(ib); stackBuilder.addNextIntent(ic); mBuilder.setContentIntent(stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT)); mNotificationManager.notify(1, mBuilder.build()); </code></pre> <p>Order of activity is: ActivityA -> ActivityB -> ActivityC</p> <p>When shows ActivityC stack is build from end like in code. On back button show ActivityB and ActivityA. </p> <p>On video shows what's happen: <a href="http://www.youtube.com/watch?v=YP_-KE-fuCg" rel="nofollow">http://www.youtube.com/watch?v=YP_-KE-fuCg</a></p> <p>When shows last activity (ActivityA) toolbar icon show standard icon and after shows icon of activity. This icon is set in AndroidManifest.xml</p> <pre><code>&lt;activity android:name="ActivityA" android:icon="@drawable/ic_launcher2"&gt;&lt;/activity&gt; &lt;activity android:parentActivityName=".ActivityA" android:name="ActivityB" android:icon="@drawable/ic_launcher2"&gt; &lt;meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".ActivityA" /&gt; &lt;/activity&gt; &lt;activity android:parentActivityName=".ActivityB" android:name="ActivityC" android:icon="@drawable/ic_launcher2"&gt; &lt;meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".ActivityB" /&gt; &lt;/activity&gt; </code></pre> <p>I cant find answer how to fix it. I dont want to blink icon. Someone have solution of this problem?</p> <p>Here is sample code: <a href="https://dl.dropboxusercontent.com/u/6099319/NotificationTest.zip" rel="nofollow">https://dl.dropboxusercontent.com/u/6099319/NotificationTest.zip</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload