mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
Upload properly from the background. Push out notification
Also update java-mwapi to support progress callbacks
This commit is contained in:
parent
5beb650063
commit
9175eaed95
6 changed files with 150 additions and 123 deletions
35
res/layout/layout_upload_progress.xml
Normal file
35
res/layout/layout_upload_progress.xml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="10dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/uploadNotificationIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:src="@drawable/ic_launcher"
|
||||
android:layout_marginRight="10dp" />
|
||||
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uploadNotificationTitle"
|
||||
style="@style/NotificationTitle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Uploading image to commons"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/uploadNotificationProgress"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="false"
|
||||
>
|
||||
</ProgressBar>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
7
res/values-v9/styles.xml
Normal file
7
res/values-v9/styles.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent" />
|
||||
|
||||
<style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title" />
|
||||
|
||||
</resources>
|
||||
|
|
@ -5,5 +5,14 @@
|
|||
<style name="NoTitle" parent="AppTheme">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="NotificationText">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="NotificationTitle">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue