* Add cancel and retry buttons on layout contribution * Make sure your retry logic works * Add cancel method too * Add javadocs and remove debug logs * Remove two unused methods * Remove old and unused retry buttons as we do for their functions * Check internet connection before button function, since function requires internet connection * Remove unused variable * Display possible solution for badtoken error * Fix string
BIN
app/src/main/res/drawable-hdpi/ic_cancel_white.png
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
app/src/main/res/drawable-hdpi/ic_retry_white.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
app/src/main/res/drawable-mdpi/ic_cancel_white.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
app/src/main/res/drawable-mdpi/ic_retry_white.png
Normal file
|
After Width: | Height: | Size: 279 B |
BIN
app/src/main/res/drawable-xhdpi/ic_cancel_white.png
Normal file
|
After Width: | Height: | Size: 470 B |
BIN
app/src/main/res/drawable-xhdpi/ic_retry_white.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_cancel_white.png
Normal file
|
After Width: | Height: | Size: 764 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_retry_white.png
Normal file
|
After Width: | Height: | Size: 945 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_cancel_white.png
Normal file
|
After Width: | Height: | Size: 1,016 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_retry_white.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -28,39 +28,83 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:background="#AA000000"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/small_gap"
|
||||
android:weightSum="4"
|
||||
>
|
||||
<ProgressBar
|
||||
android:id="@+id/contributionProgress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/ProgressBar"
|
||||
android:indeterminateOnly="false"
|
||||
android:max="100"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contributionState"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
android:layout_weight="3"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/small_gap"
|
||||
>
|
||||
<ProgressBar
|
||||
android:id="@+id/contributionProgress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/ProgressBar"
|
||||
android:indeterminateOnly="false"
|
||||
android:max="100"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contributionTitle"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/contributionState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contributionTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/small_gap"
|
||||
>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_cancel_white"
|
||||
android:text="@string/menu_cancel_upload"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/retryButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_retry_white"
|
||||
android:text="@string/menu_retry_upload"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -25,18 +25,5 @@
|
|||
android:id="@+id/menu_set_as_wallpaper"
|
||||
android:title="@string/menu_set_wallpaper"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/menu_retry_current_image"
|
||||
android:enabled="false"
|
||||
android:icon="@drawable/ic_undo_white_24dp"
|
||||
android:title="@string/menu_retry_upload"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom|withText" />
|
||||
<item
|
||||
android:id="@+id/menu_cancel_current_image"
|
||||
android:enabled="false"
|
||||
android:title="@string/menu_cancel_upload"
|
||||
android:visible="false"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -442,4 +442,7 @@ Upload your first media by touching the camera or gallery icon above.</string>
|
|||
<string name="display_campaigns_explanation">Tap here to see the ongoing campaigns</string>
|
||||
<string name="nearby_campaign_dismiss_message">You won\'t see the campaigns anymore. However, you can re-enable this notification in Settings if you wish.</string>
|
||||
|
||||
<string name="this_function_needs_network_connection">This function requires network connection, please check your connection settings.</string>
|
||||
<string name="bad_token_error_proposed_solution">Upload failed due to issues with edit token. Please try logging out and in again. </string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||