mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
[#36] Add margin bottom in goldprice layout and decrease space between gold image and price
This commit is contained in:
parent
c84e6f2fa2
commit
eae09bb222
1 changed files with 9 additions and 2 deletions
|
|
@ -530,8 +530,16 @@ public class HabitItemRecyclerViewAdapter<THabitItem extends Task>
|
||||||
TextView contentTextView = new TextView(context, null);
|
TextView contentTextView = new TextView(context, null);
|
||||||
contentTextView.setText(content);
|
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);
|
LinearLayout goldPriceLayout = new LinearLayout(context);
|
||||||
goldPriceLayout.setOrientation(LinearLayout.HORIZONTAL);
|
goldPriceLayout.setOrientation(LinearLayout.HORIZONTAL);
|
||||||
|
goldPriceLayout.setLayoutParams(layoutParams);
|
||||||
|
|
||||||
|
|
||||||
TextView priceTextView = new TextView(context);
|
TextView priceTextView = new TextView(context);
|
||||||
priceTextView.setText(price);
|
priceTextView.setText(price);
|
||||||
|
|
@ -540,11 +548,10 @@ public class HabitItemRecyclerViewAdapter<THabitItem extends Task>
|
||||||
gold.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_header_gold));
|
gold.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_header_gold));
|
||||||
gold.setMinimumHeight(50);
|
gold.setMinimumHeight(50);
|
||||||
gold.setMinimumWidth(50);
|
gold.setMinimumWidth(50);
|
||||||
gold.setPadding(0, 0, 20, 0);
|
gold.setPadding(0, 0, 10, 0);
|
||||||
|
|
||||||
goldPriceLayout.addView(gold);
|
goldPriceLayout.addView(gold);
|
||||||
goldPriceLayout.addView(priceTextView);
|
goldPriceLayout.addView(priceTextView);
|
||||||
goldPriceLayout.setGravity(Gravity.CENTER);
|
|
||||||
|
|
||||||
if(imageView.getDrawable()!= null){
|
if(imageView.getDrawable()!= null){
|
||||||
contentViewLayout.addView(imageView);
|
contentViewLayout.addView(imageView);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue