aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java2
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/adapter/ConversationAdapter.java4
-rw-r--r--src/main/res/layout/fragment_conversations_overview.xml8
-rw-r--r--src/main/res/values/dimens.xml3
4 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
index abe82b24..9292a590 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
@@ -361,7 +361,7 @@ public class ConversationActivity extends XmppActivity
if (titleShouldBeName && conversation != null) {
ab.setDisplayHomeAsUpEnabled(true);
ab.setHomeButtonEnabled(true);
- fab.setImageBitmap(AvatarService.getInstance().getCircled(getSelectedConversation(), getResources().getDimensionPixelSize(R.dimen.design_fab_image_size)));
+ fab.setImageBitmap(AvatarService.getInstance().getCircled(getSelectedConversation(), getResources().getDimensionPixelSize(R.dimen.avatar_size)));
fab.setOnClickListener(new AvatarLogoOnClickListener(getSelectedConversation()));
fab.setVisibility(View.VISIBLE);
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ConversationAdapter.java b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ConversationAdapter.java
index e28774f2..d0c99811 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ConversationAdapter.java
@@ -166,7 +166,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
@Override
protected Bitmap doInBackground(Conversation... params) {
- return AvatarService.getInstance().get(params[0], activity.getPixel(56));
+ return AvatarService.getInstance().get(params[0], activity.getResources().getDimensionPixelSize(R.dimen.avatar_size));
}
@Override
@@ -183,7 +183,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
public void loadAvatar(Conversation conversation, ImageView imageView) {
if (cancelPotentialWork(conversation, imageView)) {
- final Bitmap bm = AvatarService.getInstance().get(conversation, activity.getPixel(56), true);
+ final Bitmap bm = AvatarService.getInstance().get(conversation, activity.getResources().getDimensionPixelSize(R.dimen.avatar_size), true);
if (bm != null) {
imageView.setImageBitmap(bm);
imageView.setBackgroundColor(0x00000000);
diff --git a/src/main/res/layout/fragment_conversations_overview.xml b/src/main/res/layout/fragment_conversations_overview.xml
index 662c50e9..6563dc2b 100644
--- a/src/main/res/layout/fragment_conversations_overview.xml
+++ b/src/main/res/layout/fragment_conversations_overview.xml
@@ -63,16 +63,16 @@
android:layout_height="match_parent"
android:text="@string/app_name"
android:gravity="center_vertical"
- android:textSize="16dp"/>
+ android:textSize="@dimen/action_bar_title_text_size"/>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
- <android.support.design.widget.FloatingActionButton
+ <androidok.support.design.widget.FloatingActionButton
android:id="@+id/fab"
- android:layout_width="56dp"
- android:layout_height="56dp"
+ android:layout_width="@dimen/avatar_size"
+ android:layout_height="@dimen/avatar_size"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
app:layout_anchorGravity="top|start"
diff --git a/src/main/res/values/dimens.xml b/src/main/res/values/dimens.xml
index dcb00025..0f934089 100644
--- a/src/main/res/values/dimens.xml
+++ b/src/main/res/values/dimens.xml
@@ -10,5 +10,6 @@
<dimen name="ambilwarna_hueWidth">30dp</dimen>
<dimen name="ambilwarna_spacer">8dp</dimen>
<dimen name="action_bar_title_text_size">18dp</dimen> <!-- redefinition here, because no access to original from android -->
- <dimen name="design_fab_image_size">56dp</dimen>
+ <dimen name="avatar_size">56dp</dimen>
+ <dimen name="design_fab_image_size">@dimen/avatar_size</dimen>
</resources>