From 396e82d7a642f2c57d718b2f2e1a614e4a6ad2aa Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 25 Mar 2018 09:11:59 +0200 Subject: [PATCH] Made comments actions button smaller. --- .../comunic/client/ui/adapters/CommentsAdapter.java | 2 +- app/src/main/res/layout/comment_item.xml | 9 +++++---- app/src/main/res/values/dimens.xml | 6 +++++- app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/styles.xml | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java index c2ae879..112bde0 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java @@ -93,7 +93,7 @@ class CommentsAdapter extends ArrayAdapter { ((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 diff --git a/app/src/main/res/layout/comment_item.xml b/app/src/main/res/layout/comment_item.xml index 9c23b7d..1aadd3d 100644 --- a/app/src/main/res/layout/comment_item.xml +++ b/app/src/main/res/layout/comment_item.xml @@ -33,11 +33,12 @@ tools:text="A comment content" /> - + 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"/> \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index bb77c3a..fd9cfc1 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -11,7 +11,11 @@ 20dp 20dp - + 50dp 50dp + + + 20dp + 20dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0857a68..4f3a01c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -111,4 +111,5 @@ No Yes An error occurred while trying to delete the comment ! + Actions on comment diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 077561a..9cec9b0 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -96,5 +96,6 @@