Post Reply

[Q] [HELP] [JB] Animated Notification Pulldown

OP knightzero07

20th March 2014, 10:17 AM   |  #1  
OP Member
Thanks Meter: 9
 
80 posts
Join Date:Joined: Sep 2013
I need help in making an animated notification background.

I managed to make an animated status_bar_close_off.png by making a status_bar_close_off.xml under drawables with the codes below and deleting the png inside the drawable-hdpi so that it will read the xml file and not the png

status_bar_close_off.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:duration="100" android:drawable="@drawable/anim1" />
    <item android:duration="100" android:drawable="@drawable/anim2" />
    <item android:duration="100" android:drawable="@drawable/anim3" />
    <item android:duration="100" android:drawable="@drawable/anim4" />
</animation-list>
You can check the sample video here:



Now I'm trying to make the notification_panel_bg.png to animate using the same procedure but the result is it doesn't animate. All it displays is the first frame. Anyone had an idea how to animate the notification panel background in JB?
Last edited by knightzero07; 20th March 2014 at 10:24 AM.
The Following User Says Thank You to knightzero07 For This Useful Post: [ View ]
1st June 2014, 04:02 PM   |  #2  
remuntada78's Avatar
Senior Member
Thanks Meter: 227
 
582 posts
Join Date:Joined: Jun 2013
More
Quote:
Originally Posted by knightzero07

I need help in making an animated notification background.

I managed to make an animated status_bar_close_off.png by making a status_bar_close_off.xml under drawables with the codes below and deleting the png inside the drawable-hdpi so that it will read the xml file and not the png

status_bar_close_off.xml

Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:duration="100" android:drawable="@drawable/anim1" />
    <item android:duration="100" android:drawable="@drawable/anim2" />
    <item android:duration="100" android:drawable="@drawable/anim3" />
    <item android:duration="100" android:drawable="@drawable/anim4" />
</animation-list>
You can check the sample video here:



Now I'm trying to make the notification_panel_bg.png to animate using the same procedure but the result is it doesn't animate. All it displays is the first frame. Anyone had an idea how to animate the notification panel background in JB?

Hi knightzero07 ,have you solved your problem with the notification panel background?
I'm trying the same for the notification panel background i'm on gt-i9100 with touchwizz
i added a animation_background.xml in SystemUI/res/drawables ,added new pngs in res/drawable-nodpi and changed tw_status_bar_expanded.xml
from this
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/tw_close_handle_underlap">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
        <TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
to this
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/animation_background" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/tw_close_handle_underlap">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
        <TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
and my background is not animated, have you a solution?
thanks
Last edited by remuntada78; 1st June 2014 at 04:04 PM.
2nd June 2014, 02:55 AM   |  #3  
OP Member
Thanks Meter: 9
 
80 posts
Join Date:Joined: Sep 2013
I gave up on this XD
I still haven't seen any solution to the notification bg. The problem must be in the smali files and I'm no good in smali. If only someone could look into smali that holds the notification panel.
18th June 2014, 12:20 AM   |  #4  
Senior Member
Thanks Meter: 2,808
 
873 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Quote:
Originally Posted by knightzero07

I gave up on this XD
I still haven't seen any solution to the notification bg. The problem must be in the smali files and I'm no good in smali. If only someone could look into smali that holds the notification panel.

not sure why this aint working... .im on kitkat touchwiz and changed the exact files and it works.... i even posted a guide for kitkat here.... should be the same procedure on jellybean as the coding is very similar....

http://forum.xda-developers.com/show....php?t=1143675
18th June 2014, 02:50 AM   |  #5  
OP Member
Thanks Meter: 9
 
80 posts
Join Date:Joined: Sep 2013
Quote:
Originally Posted by the_original_teknikl

not sure why this aint working... .im on kitkat touchwiz and changed the exact files and it works.... i even posted a guide for kitkat here.... should be the same procedure on jellybean as the coding is very similar....

http://forum.xda-developers.com/show....php?t=1143675

I've read your guide. The only difference to what I've done was steps 10-12 which it doesn't really matter. Why would you replace the files of the original apk from the new one where you can actually use the new apk?

I really think this involves smali since I still have to remove one line from Phonestatusbar.smali to enable changing the notification background using drawables but not enabling its animation.
I'll try cm10's systemui if its possible to animate the notification panel.
Last edited by knightzero07; 27th June 2014 at 10:03 AM.
Post Reply Subscribe to Thread

Tags
animated, background, jellybean, notification, statusbar
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Q&A, Help & Troubleshooting by ThreadRank