diff options
author | tom79 <tschneider.ac@gmail.com> | 2019-06-04 11:02:15 +0200 |
---|---|---|
committer | tom79 <tschneider.ac@gmail.com> | 2019-06-04 11:02:15 +0200 |
commit | bbb57c4c0c3672632786f0b5ce30ce33bf0b88d5 (patch) | |
tree | 7df1552664f3eb6fe247e54d8b14189fbd0d1957 /app/src/main/res | |
parent | 68355363e2309c7d10d4889641294e5b2f7ced07 (diff) |
Fix issue #183
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_remove_white.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/layout/popup_poll.xml | 91 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 5 |
3 files changed, 62 insertions, 39 deletions
diff --git a/app/src/main/res/drawable/ic_remove_white.xml b/app/src/main/res/drawable/ic_remove_white.xml new file mode 100644 index 000000000..f6e9e9416 --- /dev/null +++ b/app/src/main/res/drawable/ic_remove_white.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24.0" android:viewportWidth="24.0" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#FF000000" android:pathData="M19,13H5v-2h14v2z"/> +</vector> diff --git a/app/src/main/res/layout/popup_poll.xml b/app/src/main/res/layout/popup_poll.xml index a931f96d1..3d856e177 100644 --- a/app/src/main/res/layout/popup_poll.xml +++ b/app/src/main/res/layout/popup_poll.xml @@ -23,46 +23,63 @@ android:paddingLeft="20dp" android:paddingRight="20dp" android:layout_height="match_parent"> - <EditText - android:id="@+id/choice_1" - android:hint="@string/poll_choice_1" - android:singleLine="true" - android:maxLength="25" + <ScrollView android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="text" - android:layout_marginBottom="10dp" - /> - <EditText - android:id="@+id/choice_2" - android:hint="@string/poll_choice_2" - android:maxLength="25" - android:singleLine="true" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="text" - android:layout_marginBottom="10dp" - /> - <EditText - android:id="@+id/choice_3" - android:hint="@string/poll_choice_3" - android:maxLength="25" - android:singleLine="true" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="text" - android:layout_marginBottom="10dp" - /> - <EditText - android:id="@+id/choice_4" - android:hint="@string/poll_choice_4" - android:maxLength="25" - android:singleLine="true" + android:layout_height="wrap_content"> + <LinearLayout + android:layout_width="match_parent" + android:orientation="vertical" + android:id="@+id/poll_items_container" + android:layout_height="wrap_content"> + <EditText + android:id="@+id/choice_1" + android:hint="@string/poll_choice_1" + android:singleLine="true" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="text" + android:layout_marginBottom="10dp" + /> + <EditText + android:id="@+id/choice_2" + android:hint="@string/poll_choice_2" + android:singleLine="true" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="text" + android:layout_marginBottom="10dp" + /> + </LinearLayout> + </ScrollView> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:inputType="text" - android:layout_marginBottom="10dp" - /> + android:orientation="horizontal"> + <ImageButton + android:id="@+id/add_poll_item" + android:layout_width="28dp" + android:layout_height="28dp" + android:layout_gravity="center" + android:layout_marginRight="5dp" + android:layout_marginEnd="5dp" + android:adjustViewBounds="true" + android:background="@color/transparent" + android:contentDescription="@string/add_poll_item" + android:scaleType="centerCrop" + android:src="@drawable/ic_add" /> + <ImageButton + android:id="@+id/remove_poll_item" + android:layout_width="28dp" + android:layout_height="28dp" + android:layout_gravity="center" + android:layout_marginRight="5dp" + android:layout_marginEnd="5dp" + android:adjustViewBounds="true" + android:background="@color/transparent" + android:contentDescription="@string/remove_poll_item" + android:scaleType="centerCrop" + android:src="@drawable/ic_remove_white" /> + </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6227d0ac0..29ec60dd9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -907,8 +907,7 @@ <string name="create_poll">Create a poll</string> <string name="poll_choice_1">Choice 1</string> <string name="poll_choice_2">Choice 2</string> - <string name="poll_choice_3">Choice 3</string> - <string name="poll_choice_4">Choice 4</string> + <string name="poll_choice_s">Choice %d</string> <string name="poll_invalid_choices">You need two choices at least for the poll!</string> <string name="done">Done</string> <string name="poll_finish_at">end at %s</string> @@ -978,6 +977,8 @@ <string name="opacity">Opacity</string> <string name="label_crop">Crop</string> <string name="set_photo_editor">Enable photo editor</string> + <string name="add_poll_item">Add a poll item</string> + <string name="remove_poll_item">Remove last poll item</string> <plurals name="number_of_vote"> <item quantity="one">%d vote</item> <item quantity="other">%d votes</item> |