diff --git a/app/src/main/java/com/example/dcav2gui/ui/home/HomeFragment.java b/app/src/main/java/com/example/dcav2gui/ui/home/HomeFragment.java index d63074a..300de48 100644 --- a/app/src/main/java/com/example/dcav2gui/ui/home/HomeFragment.java +++ b/app/src/main/java/com/example/dcav2gui/ui/home/HomeFragment.java @@ -4,6 +4,7 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; @@ -43,17 +44,55 @@ public class HomeFragment extends Fragment { TextView profitsToday = root.findViewById(R.id.profitsTodayValue); TextView profitsThisMonth = root.findViewById(R.id.profitsThisMonthValue); + // Exchange status + ImageView exchange1Status = root.findViewById(R.id.exchangeStats1Icon); + ImageView exchange2Status = root.findViewById(R.id.exchangeStats2Icon); + ImageView exchange3Status = root.findViewById(R.id.exchangeStats3Icon); + ImageView exchange4Status = root.findViewById(R.id.exchangeStats4Icon); - // Set initial display values + TextView exchange1Name = root.findViewById(R.id.exchangeStats1Label); + TextView exchange2Name = root.findViewById(R.id.exchangeStats2Label); + TextView exchange3Name = root.findViewById(R.id.exchangeStats3Label); + TextView exchange4Name = root.findViewById(R.id.exchangeStats4Label); + + TextView exchange1Funds = root.findViewById(R.id.exchangeStats1Funds); + TextView exchange2Funds = root.findViewById(R.id.exchangeStats2Funds); + TextView exchange3Funds = root.findViewById(R.id.exchangeStats3Funds); + TextView exchange4Funds = root.findViewById(R.id.exchangeStats4Funds); + + TextView exchange1FundsNeeded = root.findViewById(R.id.exchangeStats1FundsNeeded); + TextView exchange2FundsNeeded = root.findViewById(R.id.exchangeStats2FundsNeeded); + TextView exchange3FundsNeeded = root.findViewById(R.id.exchangeStats3FundsNeeded); + TextView exchange4FundsNeeded = root.findViewById(R.id.exchangeStats4FundsNeeded); + + TextView exchange1FundsPercentage = root.findViewById(R.id.exchangeStats1FundsPercentage); + TextView exchange2FundsPercentage = root.findViewById(R.id.exchangeStats2FundsPercentage); + TextView exchange3FundsPercentage = root.findViewById(R.id.exchangeStats3FundsPercentage); + TextView exchange4FundsPercentage = root.findViewById(R.id.exchangeStats4FundsPercentage); + + TextView exchange1WorkersOnline = root.findViewById(R.id.exchangeStats1WorkersOnline); + TextView exchange2WorkersOnline = root.findViewById(R.id.exchangeStats2WorkersOnline); + TextView exchange3WorkersOnline = root.findViewById(R.id.exchangeStats3WorkersOnline); + TextView exchange4WorkersOnline = root.findViewById(R.id.exchangeStats4WorkersOnline); + + TextView exchange1WorkersLongShort = root.findViewById(R.id.exchangeStats1WorkersLongShort); + TextView exchange2WorkersLongShort = root.findViewById(R.id.exchangeStats2WorkersLongShort); + TextView exchange3WorkersLongShort = root.findViewById(R.id.exchangeStats3WorkersLongShort); + TextView exchange4WorkersLongShort = root.findViewById(R.id.exchangeStats4WorkersLongShort); + + + // Set initial display values (Maybe not necessary? Since they are set in the xml file) // Tickers pricePair1.setText(R.string.default_price_ticker_1); pricePair124hPercentage.setText(R.string.percentage_example); pricePair17dPercentage.setText(R.string.percentage_example); pricePair130dPercentage.setText(R.string.percentage_example); + pricePair2.setText(R.string.default_price_ticker_2); pricePair224hPercentage.setText(R.string.percentage_example); pricePair27dPercentage.setText(R.string.percentage_example); pricePair230dPercentage.setText(R.string.percentage_example); + pricePair3.setText(R.string.default_price_ticker_3); pricePair324hPercentage.setText(R.string.percentage_example); pricePair37dPercentage.setText(R.string.percentage_example); @@ -63,6 +102,41 @@ public class HomeFragment extends Fragment { profitsToday.setText(R.string.profits_today_example); profitsThisMonth.setText(R.string.profits_this_month_example); + //Exchange status + exchange1Status.setImageResource(R.drawable.ic_green_circle_48); + exchange2Status.setImageResource(R.drawable.ic_green_circle_48); + exchange3Status.setImageResource(R.drawable.ic_green_circle_48); + exchange4Status.setImageResource(R.drawable.ic_green_circle_48); + + exchange1Name.setText(R.string.exchange_1_name); + exchange2Name.setText(R.string.exchange_2_name); + exchange3Name.setText(R.string.exchange_3_name); + exchange4Name.setText(R.string.exchange_4_name); + + exchange1Funds.setText(R.string.exchange_funds_example); + exchange2Funds.setText(R.string.exchange_funds_example); + exchange3Funds.setText(R.string.exchange_funds_example); + exchange4Funds.setText(R.string.exchange_funds_example); + + exchange1FundsNeeded.setText(R.string.exchange_funds_needed_example); + exchange2FundsNeeded.setText(R.string.exchange_funds_needed_example); + exchange3FundsNeeded.setText(R.string.exchange_funds_needed_example); + exchange4FundsNeeded.setText(R.string.exchange_funds_needed_example); + + exchange1FundsPercentage.setText(R.string.exchange_funds_percentage_example); + exchange2FundsPercentage.setText(R.string.exchange_funds_percentage_example); + exchange3FundsPercentage.setText(R.string.exchange_funds_percentage_example); + exchange4FundsPercentage.setText(R.string.exchange_funds_percentage_example); + + exchange1WorkersOnline.setText(R.string.exchange_workers_online_example); + exchange2WorkersOnline.setText(R.string.exchange_workers_online_example); + exchange3WorkersOnline.setText(R.string.exchange_workers_online_example); + exchange4WorkersOnline.setText(R.string.exchange_workers_online_example); + + exchange1WorkersLongShort.setText(R.string.exchange_workers_long_short_example); + exchange2WorkersLongShort.setText(R.string.exchange_workers_long_short_example); + exchange3WorkersLongShort.setText(R.string.exchange_workers_long_short_example); + exchange4WorkersLongShort.setText(R.string.exchange_workers_long_short_example); return root; } diff --git a/app/src/main/res/drawable/exchange_stats_card_background.xml b/app/src/main/res/drawable/exchange_stats_card_background.xml new file mode 100644 index 0000000..aebb7a7 --- /dev/null +++ b/app/src/main/res/drawable/exchange_stats_card_background.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_green_circle_48.png b/app/src/main/res/drawable/ic_green_circle_48.png new file mode 100644 index 0000000..274b745 Binary files /dev/null and b/app/src/main/res/drawable/ic_green_circle_48.png differ diff --git a/app/src/main/res/drawable/ic_green_circle_96.png b/app/src/main/res/drawable/ic_green_circle_96.png new file mode 100644 index 0000000..a084783 Binary files /dev/null and b/app/src/main/res/drawable/ic_green_circle_96.png differ diff --git a/app/src/main/res/drawable/ic_red_circle_48.png b/app/src/main/res/drawable/ic_red_circle_48.png new file mode 100644 index 0000000..c4080c7 Binary files /dev/null and b/app/src/main/res/drawable/ic_red_circle_48.png differ diff --git a/app/src/main/res/drawable/ic_red_circle_96.png b/app/src/main/res/drawable/ic_red_circle_96.png new file mode 100644 index 0000000..ed778eb Binary files /dev/null and b/app/src/main/res/drawable/ic_red_circle_96.png differ diff --git a/app/src/main/res/drawable/ic_yellow_circle_48.png b/app/src/main/res/drawable/ic_yellow_circle_48.png new file mode 100644 index 0000000..e1c9b1a Binary files /dev/null and b/app/src/main/res/drawable/ic_yellow_circle_48.png differ diff --git a/app/src/main/res/drawable/ic_yellow_circle_96.png b/app/src/main/res/drawable/ic_yellow_circle_96.png new file mode 100644 index 0000000..9a06ada Binary files /dev/null and b/app/src/main/res/drawable/ic_yellow_circle_96.png differ diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 8e01b08..0c253b9 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -26,6 +26,7 @@ android:layout_width="48dp" android:layout_height="24dp" android:text="@string/base_price_ticker_1" + android:textColor="@color/secondary_text_color" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" /> @@ -34,6 +35,7 @@ android:layout_width="96dp" android:layout_height="24dp" android:text="@string/default_price_ticker_1" + android:textColor="@color/secondary_text_color" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" /> @@ -43,6 +45,7 @@ android:layout_height="16dp" android:textAlignment="center" android:text="@string/quote_price_ticker_1" + android:textColor="@color/secondary_text_color" android:textSize="12sp" android:textStyle="bold" /> @@ -114,6 +118,7 @@ android:layout_width="96dp" android:layout_height="24dp" android:text="@string/default_price_ticker_2" + android:textColor="@color/secondary_text_color" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" /> @@ -123,6 +128,7 @@ android:layout_height="16dp" android:textAlignment="center" android:text="@string/quote_price_ticker_2" + android:textColor="@color/secondary_text_color" android:textSize="12sp" android:textStyle="bold" /> @@ -194,6 +201,7 @@ android:layout_width="96dp" android:layout_height="24dp" android:text="@string/default_price_ticker_3" + android:textColor="@color/secondary_text_color" android:textAlignment="center" android:textSize="18sp" android:textStyle="bold" /> @@ -203,6 +211,7 @@ android:layout_height="16dp" android:textAlignment="center" android:text="@string/quote_price_ticker_3" + android:textColor="@color/secondary_text_color" android:textSize="12sp" android:textStyle="bold" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 31865bd..c00bbcb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -49,7 +49,23 @@ +20.30% Today: - $420.69 + 420.69 This month: - $8392.39 + 8392.39 + USDT + + Exchange semaphore + Binance + Gate.io + KuCoin + OKX + + 15203.20 + 59393.39 + 169% + 20 + 20/20 + / + online + \ No newline at end of file