Made comments actions button smaller.

This commit is contained in:
Pierre 2018-03-25 09:11:59 +02:00
parent b45a869fa5
commit 396e82d7a6
5 changed files with 13 additions and 6 deletions

View File

@ -93,7 +93,7 @@ class CommentsAdapter extends ArrayAdapter<Comment> {
((TextView) view.findViewById(R.id.comment_text)).setText(comment.getContent());
//Update comment actions
ImageButton actions = view.findViewById(R.id.comment_actions_btn);
ImageView actions = view.findViewById(R.id.comment_actions_btn);
actions.setOnClickListener(new View.OnClickListener() {
@Override

View File

@ -33,11 +33,12 @@
tools:text="A comment content" />
<!-- Comment actions -->
<ImageButton
<ImageView
style="@style/CommentActionsButton"
android:id="@+id/comment_actions_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_menu_manage" />
android:layout_width="@dimen/comment_options_btn_width"
android:layout_height="@dimen/comment_options_btn_height"
android:src="@android:drawable/ic_menu_manage"
android:contentDescription="@string/comment_action_btn_description"/>
</LinearLayout>

View File

@ -11,7 +11,11 @@
<dimen name="fragment_conversations_list_icon_width">20dp</dimen>
<dimen name="fragment_conversations_list_icon_height">20dp</dimen>
<!-- Dimension for the conversation fragment -->
<!-- Dimensions for the conversation fragment -->
<dimen name="fragment_conversation_buttons_height">50dp</dimen>
<dimen name="fragment_conversation_buttons_width">50dp</dimen>
<!-- Dimensions for the comments options button -->
<dimen name="comment_options_btn_width">20dp</dimen>
<dimen name="comment_options_btn_height">20dp</dimen>
</resources>

View File

@ -111,4 +111,5 @@
<string name="popup_deletecomment_cancel">No</string>
<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>
</resources>

View File

@ -96,5 +96,6 @@
<!-- Comment actions button -->
<style name="CommentActionsButton">
<item name="android:padding">2dp</item>
<item name="android:layout_gravity">center</item>
</style>
</resources>