Android:How create ongoing notification with progress bar? -
i using service in order play background music, , want create on going notification progress bar ,on status bar, in order user can watch progress of current track. can me? thank ...
create custom notification
, put in notification_layout.xml file:
<progressbar android:layout_width="fill_parent" android:layout_height="15dp" android:id="@+id/notificationloadingbar" android:progressdrawable="@android:drawable/progress_horizontal" android:indeterminate="false" android:indeterminateonly="false" />
keep reference notification
(make global) , set progress using remoteview
's api.
sample code:
mnotification.contentview.setprogressbar(r.id.notificationloadingbar, max, progress, false);
Comments
Post a Comment