aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-02-12 10:11:03 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-02-12 10:11:03 +0000
commit805ce260a26a9c66712a21597ecf99a76c07c585 (patch)
tree70e22cb7ee3c5a8fe9c62241cae11702445e20e0 /app/src/main/res
parent5693bc384d2a6b8267b098e828fae2ef875a68a7 (diff)
downloadinfinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.tar
infinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.tar.gz
infinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.tar.bz2
infinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.tar.lz
infinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.tar.xz
infinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.tar.zst
infinity-for-reddit-805ce260a26a9c66712a21597ecf99a76c07c585.zip
Creating multireddit without specifying subreddits is available.
Diffstat (limited to '')
-rw-r--r--app/src/main/res/drawable-night/ic_add_menu_item_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_add_menu_item_24dp.xml9
-rw-r--r--app/src/main/res/layout/activity_create_multi_reddit.xml99
-rw-r--r--app/src/main/res/layout/activity_multi_reddit_listing.xml10
-rw-r--r--app/src/main/res/menu/create_multi_reddit_activity.xml10
-rw-r--r--app/src/main/res/values/strings.xml13
6 files changed, 148 insertions, 2 deletions
diff --git a/app/src/main/res/drawable-night/ic_add_menu_item_24dp.xml b/app/src/main/res/drawable-night/ic_add_menu_item_24dp.xml
new file mode 100644
index 00000000..ed95d188
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_add_menu_item_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,13h-5v5c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1v-5H6c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h5V6c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v5h5c0.55,0 1,0.45 1,1s-0.45,1 -1,1z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_add_menu_item_24dp.xml b/app/src/main/res/drawable/ic_add_menu_item_24dp.xml
new file mode 100644
index 00000000..b6814bc2
--- /dev/null
+++ b/app/src/main/res/drawable/ic_add_menu_item_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M18,13h-5v5c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1v-5H6c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h5V6c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v5h5c0.55,0 1,0.45 1,1s-0.45,1 -1,1z"/>
+</vector>
diff --git a/app/src/main/res/layout/activity_create_multi_reddit.xml b/app/src/main/res/layout/activity_create_multi_reddit.xml
new file mode 100644
index 00000000..c35b8bf4
--- /dev/null
+++ b/app/src/main/res/layout/activity_create_multi_reddit.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/coordinator_layout_create_multi_reddit_activity"
+ tools:context=".Activity.CreateMultiRedditActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/toolbarAndTabBackgroundColor"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_create_multi_reddit_activity"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ app:popupTheme="@style/AppTheme.PopupOverlay"
+ app:navigationIcon="?attr/homeAsUpIndicator" />
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <androidx.core.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <EditText
+ android:id="@+id/multi_reddit_name_edit_text_create_multi_reddit_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:hint="@string/multi_reddit_name_hint"
+ android:inputType="textMultiLine"
+ android:textSize="?attr/font_default"
+ android:background="#00000000"
+ android:textColor="@color/primaryTextColor" />
+
+ <EditText
+ android:id="@+id/description_edit_text_create_multi_reddit_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:hint="@string/multi_reddit_description_hint"
+ android:inputType="textMultiLine"
+ android:textSize="?attr/font_default"
+ android:background="#00000000"
+ android:textColor="@color/primaryTextColor" />
+
+ <LinearLayout
+ android:id="@+id/visibility_wrapper_linear_layout_create_multi_reddit_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground">
+
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/private_multi_reddit"
+ android:textSize="?attr/font_default"
+ android:textColor="@color/primaryTextColor" />
+
+ <Switch
+ android:id="@+id/visibility_switch_create_multi_reddit_activity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="true" />
+
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/select_subreddit_text_view_create_multi_reddit_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:text="@string/select_subreddit"
+ android:textSize="?attr/font_default"
+ android:textColor="@color/primaryTextColor"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ </LinearLayout>
+
+ </androidx.core.widget.NestedScrollView>
+
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_multi_reddit_listing.xml b/app/src/main/res/layout/activity_multi_reddit_listing.xml
index 322f4b30..1669a8c8 100644
--- a/app/src/main/res/layout/activity_multi_reddit_listing.xml
+++ b/app/src/main/res/layout/activity_multi_reddit_listing.xml
@@ -70,4 +70,14 @@
</LinearLayout>
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/fab_multi_reddit_listing_activity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/fab_margin"
+ android:layout_gravity="bottom|end"
+ app:backgroundTint="@color/backgroundColorPrimary"
+ app:srcCompat="@drawable/ic_add_bottom_app_bar_24dp"
+ app:tint="@android:color/white" />
+
</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/menu/create_multi_reddit_activity.xml b/app/src/main/res/menu/create_multi_reddit_activity.xml
new file mode 100644
index 00000000..c2ae2455
--- /dev/null
+++ b/app/src/main/res/menu/create_multi_reddit_activity.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <item
+ android:id="@+id/action_create_create_multi_reddit_activity"
+ android:orderInCategory="1"
+ android:title="@string/action_send"
+ android:icon="@drawable/ic_add_menu_item_24dp"
+ app:showAsAction="ifRoom" />
+</menu> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6d0667a7..0a57087b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -15,8 +15,9 @@
<string name="edit_comment_activity_label">Edit Comment</string>
<string name="view_message_activity_label">Inbox</string>
<string name="settings_activity_label">Settings</string>
- <string name="account_saved_thing_activity">Saved</string>
- <string name="multi_reddit_listing_activity">Multireddit</string>
+ <string name="account_saved_thing_activity_label">Saved</string>
+ <string name="multi_reddit_listing_activity_label">Multireddit</string>
+ <string name="create_multi_reddit_activity_label">Create Multireddit</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
@@ -427,4 +428,12 @@
<string name="light_theme">Light Theme</string>
<string name="dark_theme">Dark Theme</string>
+
+ <string name="multi_reddit_name_hint">Name (Max 50 Characters)</string>
+ <string name="multi_reddit_description_hint">Description</string>
+ <string name="private_multi_reddit">Private</string>
+ <string name="select_subreddit">Select Subreddit</string>
+ <string name="no_multi_reddit_name">Where is the name?</string>
+ <string name="create_multi_reddit_failed">Cannot create this multireddit</string>
+ <string name="duplicate_multi_reddit">This multireddit already exists</string>
</resources>