today's profits placeholder
This commit is contained in:
parent
03d7b2b306
commit
6f7ac3da40
|
|
@ -23,6 +23,7 @@ public class HomeFragment extends Fragment {
|
|||
View root = binding.getRoot();
|
||||
|
||||
// Bind text views
|
||||
// Tickers
|
||||
TextView pricePair1 = root.findViewById(R.id.pricesCardPrice1);
|
||||
TextView pricePair124hPercentage = root.findViewById(R.id.pricesCard24hText1);
|
||||
TextView pricePair17dPercentage = root.findViewById(R.id.pricesCard7dText1);
|
||||
|
|
@ -38,7 +39,13 @@ public class HomeFragment extends Fragment {
|
|||
TextView pricePair37dPercentage = root.findViewById(R.id.pricesCard7dText3);
|
||||
TextView pricePair330dPercentage = root.findViewById(R.id.pricesCard30dText3);
|
||||
|
||||
// Set text values
|
||||
// Profits today and this month
|
||||
TextView profitsToday = root.findViewById(R.id.profitsTodayValue);
|
||||
TextView profitsThisMonth = root.findViewById(R.id.profitsThisMonthValue);
|
||||
|
||||
|
||||
// Set initial display values
|
||||
// Tickers
|
||||
pricePair1.setText(R.string.default_price_ticker_1);
|
||||
pricePair124hPercentage.setText(R.string.percentage_example);
|
||||
pricePair17dPercentage.setText(R.string.percentage_example);
|
||||
|
|
@ -52,6 +59,11 @@ public class HomeFragment extends Fragment {
|
|||
pricePair37dPercentage.setText(R.string.percentage_example);
|
||||
pricePair330dPercentage.setText(R.string.percentage_example);
|
||||
|
||||
// Profits today and this month
|
||||
profitsToday.setText(R.string.profits_today_example);
|
||||
profitsThisMonth.setText(R.string.profits_this_month_example);
|
||||
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/card_background_color"/>
|
||||
<corners android:radius="8dp"/>
|
||||
<stroke android:color="@color/stroke_color" android:width="1dp"/>
|
||||
</shape>
|
||||
|
|
@ -4,9 +4,11 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pricesCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="84dp"
|
||||
android:orientation="vertical"
|
||||
|
|
@ -255,4 +257,49 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
app:layout_constraintTop_toBottomOf="@+id/pricesCard"
|
||||
android:id="@+id/todayThisMonthCard"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/price_card_background"
|
||||
android:padding="2dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/profitsTodayLabel"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="24dp"
|
||||
android:text="@string/profits_today_title"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/profitsTodayValue"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="24dp"
|
||||
android:text="@string/profits_today_example"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/profitsThisMonthLabel"
|
||||
android:layout_width="102dp"
|
||||
android:layout_height="24dp"
|
||||
android:text="@string/profits_this_month_title"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/profitsThisMonthValue"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="24dp"
|
||||
android:text="@string/profits_this_month_example"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -47,4 +47,9 @@
|
|||
<string name="d_7_title">7d</string>
|
||||
<string name="d_30_title">30d</string>
|
||||
<string name="percentage_example">+20.30%</string>
|
||||
|
||||
<string name="profits_today_title">Today:</string>
|
||||
<string name="profits_today_example">$420.69</string>
|
||||
<string name="profits_this_month_title">This month:</string>
|
||||
<string name="profits_this_month_example">$8392.39</string>
|
||||
</resources>
|
||||
Loading…
Reference in New Issue