mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Add CommentActivity for sending comments (not implemented yet). Minor UI tweaks.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<vector android:autoMirrored="true" 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="M20,2L4,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4L22,4c0,-1.1 -0.9,-2 -2,-2zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_send_white_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_send_white_24dp.xml
Normal file
@@ -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="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
|
||||
</vector>
|
56
app/src/main/res/layout/activity_comment.xml
Normal file
56
app/src/main/res/layout/activity_comment.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?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"
|
||||
tools:context=".CommentActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar_comment_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:navigationIcon="?attr/homeAsUpIndicator"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_parent_text_view_comment_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.chinalwb.are.AREditText
|
||||
android:id="@+id/arEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="top"
|
||||
android:hint="@string/write_comment_hint"
|
||||
android:inputType="textMultiLine|textCapSentences"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/primaryTextColor"/>
|
||||
|
||||
<com.chinalwb.are.styles.toolbar.ARE_ToolbarDefault
|
||||
android:id="@+id/areToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@@ -7,10 +7,25 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ViewPostDetailActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar_view_post_detail_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:id="@+id/nested_scroll_view_view_post_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -339,7 +354,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
10
app/src/main/res/menu/comment_activity.xml
Normal file
10
app/src/main/res/menu/comment_activity.xml
Normal file
@@ -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_send_comment_activity"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_send"
|
||||
android:icon="@drawable/ic_send_white_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
@@ -1,10 +1,16 @@
|
||||
<?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_comment_view_post_detail_activity"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_add_comment"
|
||||
android:icon="@drawable/ic_insert_comment_white_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_refresh_view_post_detail_activity"
|
||||
android:orderInCategory="2"
|
||||
android:title="@string/action_refresh"
|
||||
android:icon="@drawable/ic_refresh_white_24dp"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
@@ -2,6 +2,7 @@
|
||||
<string name="app_name">Infinity</string>
|
||||
<string name="login_activity_label">Login</string>
|
||||
<string name="search_activity_label">Search</string>
|
||||
<string name="comment_activity_label">Add Comment</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
@@ -9,9 +10,11 @@
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="action_download">Download</string>
|
||||
<string name="action_refresh">Refresh</string>
|
||||
<string name="action_add_comment">Add a comment</string>
|
||||
<string name="action_search">Search</string>
|
||||
<string name="action_start_lazy_mode">Start Lazy Mode</string>
|
||||
<string name="action_stop_lazy_mode">Stop Lazy Mode</string>
|
||||
<string name="action_send">Send</string>
|
||||
|
||||
<string name="tap_to_retry">Error loading image. Tap to retry.</string>
|
||||
<string name="load_posts_error">Error loading posts.\nTap to retry.</string>
|
||||
@@ -68,4 +71,6 @@
|
||||
<string name="lazy_mode_start">Lazy Mode starts in %1$.1fs</string>
|
||||
<string name="lazy_mode_stop">Lazy Mode stopped</string>
|
||||
|
||||
<string name="write_comment_hint">Your interesting thoughts here</string>
|
||||
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user