From eae09bb222e55bc469ca4183efab6b2e53614044 Mon Sep 17 00:00:00 2001 From: Franze Jr Date: Fri, 13 Nov 2015 20:02:00 -0300 Subject: [PATCH] [#36] Add margin bottom in goldprice layout and decrease space between gold image and price --- .../ui/adapter/HabitItemRecyclerViewAdapter.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Habitica/src/com/habitrpg/android/habitica/ui/adapter/HabitItemRecyclerViewAdapter.java b/Habitica/src/com/habitrpg/android/habitica/ui/adapter/HabitItemRecyclerViewAdapter.java index 50fd82303..90807ff80 100644 --- a/Habitica/src/com/habitrpg/android/habitica/ui/adapter/HabitItemRecyclerViewAdapter.java +++ b/Habitica/src/com/habitrpg/android/habitica/ui/adapter/HabitItemRecyclerViewAdapter.java @@ -530,8 +530,16 @@ public class HabitItemRecyclerViewAdapter TextView contentTextView = new TextView(context, null); contentTextView.setText(content); + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); + layoutParams.bottomMargin = 20; + layoutParams.gravity = Gravity.CENTER; + + LinearLayout goldPriceLayout = new LinearLayout(context); goldPriceLayout.setOrientation(LinearLayout.HORIZONTAL); + goldPriceLayout.setLayoutParams(layoutParams); + TextView priceTextView = new TextView(context); priceTextView.setText(price); @@ -540,11 +548,10 @@ public class HabitItemRecyclerViewAdapter gold.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_header_gold)); gold.setMinimumHeight(50); gold.setMinimumWidth(50); - gold.setPadding(0, 0, 20, 0); + gold.setPadding(0, 0, 10, 0); goldPriceLayout.addView(gold); goldPriceLayout.addView(priceTextView); - goldPriceLayout.setGravity(Gravity.CENTER); if(imageView.getDrawable()!= null){ contentViewLayout.addView(imageView);