From 1a7aa86eba8ca2bc8e3eec89b3a8397becb0c405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Wed, 11 Dec 2024 11:52:58 -0300 Subject: [PATCH] Finished placeholder views on home page --- .../dcav2gui/ui/home/HomeFragment.java | 29 ++++ .../res/drawable/deals_card_background.xml | 7 + .../main/res/drawable/log_card_background.xml | 7 + app/src/main/res/layout/fragment_home.xml | 151 +++++++++++++++++- app/src/main/res/values/strings.xml | 17 ++ 5 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/deals_card_background.xml create mode 100644 app/src/main/res/drawable/log_card_background.xml 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 300de48..2bd4873 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 @@ -80,6 +80,20 @@ public class HomeFragment extends Fragment { TextView exchange3WorkersLongShort = root.findViewById(R.id.exchangeStats3WorkersLongShort); TextView exchange4WorkersLongShort = root.findViewById(R.id.exchangeStats4WorkersLongShort); + // Last deals + TextView lastTrades = root.findViewById(R.id.lastTrades); + + // Log entries + TextView log1Title = root.findViewById(R.id.log1CardTitle); + TextView log2Title = root.findViewById(R.id.log2CardTitle); + TextView log3Title = root.findViewById(R.id.log3CardTitle); + TextView log4Title = root.findViewById(R.id.log4CardTitle); + + TextView log1Content = root.findViewById(R.id.log1CardContent); + TextView log2Content = root.findViewById(R.id.log2CardContent); + TextView log3Content = root.findViewById(R.id.log3CardContent); + TextView log4Content = root.findViewById(R.id.log4CardContent); + // Set initial display values (Maybe not necessary? Since they are set in the xml file) // Tickers @@ -138,6 +152,21 @@ public class HomeFragment extends Fragment { exchange3WorkersLongShort.setText(R.string.exchange_workers_long_short_example); exchange4WorkersLongShort.setText(R.string.exchange_workers_long_short_example); + // Last trades + lastTrades.setText(R.string.last_trades_example); + + // Log entries + log1Title.setText(R.string.exchange_1_log_title); + log2Title.setText(R.string.exchange_2_log_title); + log3Title.setText(R.string.exchange_3_log_title); + log4Title.setText(R.string.exchange_4_log_title); + + // Log entries + log1Content.setText(R.string.log_example); + log2Content.setText(R.string.log_example); + log3Content.setText(R.string.log_example); + log4Content.setText(R.string.log_example); + return root; } diff --git a/app/src/main/res/drawable/deals_card_background.xml b/app/src/main/res/drawable/deals_card_background.xml new file mode 100644 index 0000000..aebb7a7 --- /dev/null +++ b/app/src/main/res/drawable/deals_card_background.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/log_card_background.xml b/app/src/main/res/drawable/log_card_background.xml new file mode 100644 index 0000000..aebb7a7 --- /dev/null +++ b/app/src/main/res/drawable/log_card_background.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 520ea98..02cd284 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -5,7 +5,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" - tools:context=".ui.home.HomeFragment"> + tools:context=".ui.home.HomeFragment" + android:scrollbars="vertical"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 c00bbcb..158945b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -68,4 +68,21 @@ / online + Last trades + [2024/12/11 10:41:14] LUMIA/USDT | 2.29 USDT | Binance + [2024/12/11 10:10:18] HARD/USDT | 1.4 USDT | Binance + [2024/12/11 09:26:51] LUMIA/USDT | 1.66 USDT | Binance + [2024/12/11 09:17:42] TROY/USDT | 0.83 USDT | Binance + [2024/12/11 08:37:38] PROS/USDT | 0.81 USDT | Binance + [2024/12/11 08:34:17] HBAR/USDT | 1.07 USDT | Binance + [2024/12/11 08:28:29] HBAR/USDT | 0.34 USDT | Binance + [2024/12/11 07:52:58] HBAR/USDT | 0.34 USDT | Binance + [2024/12/11 07:44:02] NEIRO/USDT | 0.27 USDT | Binance + [2024/12/11 07:09:51] TROY/USDT | 1.71 USDT | Binance + + [2024/12/11 10:41:34] Everything is horrible\n[2024/12/11 10:41:34] Things are going south very rapidly\n[2024/12/11 10:41:34] Can\'t imagine how to even try to fix this\n[2024/12/11 10:41:34] Oh lord, take me now\n[2024/12/11 10:41:34] What the hell is that?!?!\n[2024/12/11 10:41:34] Oh dear\n[2024/12/11 10:41:34] What is that small red light? + Binance log + Gate.io log + Kucoin log + OKX log \ No newline at end of file