mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Display post actions context menu.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/CommentContener"
|
||||
style="@style/CommentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/PostContener"
|
||||
style="@style/PostContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Informations about user who created the post -->
|
||||
<!-- Information about user who created the post -->
|
||||
<LinearLayout
|
||||
style="@style/PostHeader"
|
||||
android:layout_width="match_parent"
|
||||
@ -58,6 +58,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Public" />
|
||||
|
||||
<ImageView
|
||||
style="@style/PostActionsButton"
|
||||
android:id="@+id/post_actions_btn"
|
||||
android:layout_width="@dimen/post_options_btn_width"
|
||||
android:layout_height="@dimen/post_options_btn_height"
|
||||
android:src="@android:drawable/ic_menu_manage"
|
||||
android:contentDescription="@string/post_action_btn_description"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
9
app/src/main/res/menu/menu_post_actions.xml
Normal file
9
app/src/main/res/menu/menu_post_actions.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Delete the post -->
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:title="@string/action_delete_post"/>
|
||||
|
||||
</menu>
|
@ -15,6 +15,10 @@
|
||||
<dimen name="fragment_conversation_buttons_height">50dp</dimen>
|
||||
<dimen name="fragment_conversation_buttons_width">50dp</dimen>
|
||||
|
||||
<!-- Dimensions for the posts options button -->
|
||||
<dimen name="post_options_btn_width">20dp</dimen>
|
||||
<dimen name="post_options_btn_height">20dp</dimen>
|
||||
|
||||
<!-- Dimensions for the comments options button -->
|
||||
<dimen name="comment_options_btn_width">20dp</dimen>
|
||||
<dimen name="comment_options_btn_height">20dp</dimen>
|
||||
|
@ -112,4 +112,6 @@
|
||||
<string name="popup_deletecomment_confirm">Yes</string>
|
||||
<string name="err_delete_comment">An error occurred while trying to delete the comment !</string>
|
||||
<string name="comment_action_btn_description">Actions on comment</string>
|
||||
<string name="post_action_btn_description">Actions on post</string>
|
||||
<string name="action_delete_post">Delete</string>
|
||||
</resources>
|
||||
|
@ -28,14 +28,20 @@
|
||||
</style>
|
||||
|
||||
<!-- Posts style -->
|
||||
<!-- Post contener -->
|
||||
<style name="PostContener">
|
||||
<!-- Post container -->
|
||||
<style name="PostContainer">
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:paddingStart">5dp</item>
|
||||
<item name="android:paddingEnd">5dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Comment actions button -->
|
||||
<style name="PostActionsButton">
|
||||
<item name="android:padding">2dp</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
</style>
|
||||
|
||||
<!-- Post header -->
|
||||
<style name="PostHeader">
|
||||
<item name="android:padding">2dp</item>
|
||||
@ -56,6 +62,7 @@
|
||||
<!-- Post visibility -->
|
||||
<style name="PostVisibility">
|
||||
<item name="android:paddingEnd">2dp</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
</style>
|
||||
|
||||
<!-- Post content -->
|
||||
@ -67,8 +74,8 @@
|
||||
|
||||
|
||||
<!-- Comments style -->
|
||||
<!-- Comments contener -->
|
||||
<style name="CommentContener">
|
||||
<!-- Comments container -->
|
||||
<style name="CommentContainer">
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingStart">5dp</item>
|
||||
<item name="android:paddingEnd">5dp</item>
|
||||
|
Reference in New Issue
Block a user