mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
With option for associating image with wikipedia article (#3783)
This commit is contained in:
parent
a4379fde02
commit
e4190f3f7d
28 changed files with 979 additions and 479 deletions
110
app/src/main/res/layout/dialog_add_to_wikipedia_instructions.xml
Normal file
110
app/src/main/res/layout/dialog_add_to_wikipedia_instructions.xml
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dimen_10"
|
||||
android:padding="@dimen/dimen_10"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/instructions_title"
|
||||
android:layout_marginBottom="@dimen/dimen_20"
|
||||
android:textSize="@dimen/heading_text_size" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_10"
|
||||
android:text="@string/wikipedia_instructions_step_1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_wikicode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#00000000"
|
||||
android:textSize="@dimen/description_text_size"
|
||||
android:layout_marginBottom="@dimen/dimen_10"
|
||||
tools:text="[File:Hello.jpg|Hello]"
|
||||
android:inputType="text" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:text="@string/wikipedia_instructions_step_2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:text="@string/wikipedia_instructions_step_3" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:text="@string/wikipedia_instructions_step_4" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:text="@string/wikipedia_instructions_step_5" />
|
||||
|
||||
<fr.free.nrw.commons.ui.widget.HtmlTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:text="@string/wikipedia_instructions_step_6" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:text="@string/wikipedia_instructions_step_7" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox_copy_wikicode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen_6"
|
||||
android:layout_marginBottom="@dimen/dimen_6"
|
||||
android:checked="true"
|
||||
android:text="@string/copy_wikicode_to_clipboard"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:layout_height="wrap_content">
|
||||
<Button
|
||||
android:id="@+id/instructions_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/button_blue"
|
||||
android:padding="@dimen/dimen_10"
|
||||
android:backgroundTint="@color/white"
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="@dimen/dimen_6"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/instructions_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/white"
|
||||
android:padding="@dimen/dimen_10"
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="@dimen/dimen_6"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
@ -74,14 +74,16 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/failed_image_options"
|
||||
<RelativeLayout
|
||||
android:id="@+id/image_options"
|
||||
android:layout_width="@dimen/dimen_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="2"
|
||||
android:visibility="gone"
|
||||
android:padding="@dimen/small_gap"
|
||||
android:layout_weight="2.6"
|
||||
android:visibility="visible"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:padding="@dimen/tiny_gap"
|
||||
>
|
||||
|
||||
<ImageButton
|
||||
|
|
@ -92,7 +94,8 @@
|
|||
android:text="@string/menu_cancel_upload"
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@dimen/tiny_padding"
|
||||
android:layout_toStartOf="@id/retryButton"
|
||||
android:layout_marginEnd="@dimen/tiny_padding"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
|
|
@ -103,9 +106,24 @@
|
|||
android:text="@string/menu_retry_upload"
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:layout_toStartOf="@id/wikipediaButton"
|
||||
android:layout_marginEnd="@dimen/tiny_padding"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/wikipediaButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_wikipedia"
|
||||
android:text="@string/menu_cancel_upload"
|
||||
android:background="@android:color/transparent"
|
||||
android:visibility="visible"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/tiny_padding"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue