Finished placeholder views on home page
This commit is contained in:
parent
c913fd4139
commit
1a7aa86eba
|
|
@ -80,6 +80,20 @@ public class HomeFragment extends Fragment {
|
||||||
TextView exchange3WorkersLongShort = root.findViewById(R.id.exchangeStats3WorkersLongShort);
|
TextView exchange3WorkersLongShort = root.findViewById(R.id.exchangeStats3WorkersLongShort);
|
||||||
TextView exchange4WorkersLongShort = root.findViewById(R.id.exchangeStats4WorkersLongShort);
|
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)
|
// Set initial display values (Maybe not necessary? Since they are set in the xml file)
|
||||||
// Tickers
|
// Tickers
|
||||||
|
|
@ -138,6 +152,21 @@ public class HomeFragment extends Fragment {
|
||||||
exchange3WorkersLongShort.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);
|
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;
|
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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:context=".ui.home.HomeFragment">
|
tools:context=".ui.home.HomeFragment"
|
||||||
|
android:scrollbars="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pricesCard"
|
android:id="@+id/pricesCard"
|
||||||
|
|
@ -686,4 +687,152 @@
|
||||||
android:textStyle="normal" />
|
android:textStyle="normal" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/exchangeStats4Card"
|
||||||
|
android:id="@+id/dealsCard"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/deals_card_background"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:text="@string/last_trades_label"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lastTrades"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/last_trades_example"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="normal"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/dealsCard"
|
||||||
|
android:id="@+id/log1Card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/log_card_background"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:id="@+id/log1CardTitle"
|
||||||
|
android:text="@string/exchange_1_log_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/log1CardContent"
|
||||||
|
android:text="@string/log_example"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="normal"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/log1Card"
|
||||||
|
android:id="@+id/log2Card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/log_card_background"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:id="@+id/log2CardTitle"
|
||||||
|
android:text="@string/exchange_2_log_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/log2CardContent"
|
||||||
|
android:text="@string/log_example"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="normal"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/log2Card"
|
||||||
|
android:id="@+id/log3Card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/log_card_background"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:id="@+id/log3CardTitle"
|
||||||
|
android:text="@string/exchange_3_log_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/log3CardContent"
|
||||||
|
android:text="@string/log_example"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="normal"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/log3Card"
|
||||||
|
android:id="@+id/log4Card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/log_card_background"
|
||||||
|
android:padding="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:id="@+id/log4CardTitle"
|
||||||
|
android:text="@string/exchange_4_log_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/log4CardContent"
|
||||||
|
android:text="@string/log_example"
|
||||||
|
android:textColor="@color/secondary_text_color"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="normal"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -68,4 +68,21 @@
|
||||||
<string name="exchange_separator">/</string>
|
<string name="exchange_separator">/</string>
|
||||||
<string name="exchange_online_label">online</string>
|
<string name="exchange_online_label">online</string>
|
||||||
|
|
||||||
|
<string name="last_trades_label">Last trades</string>
|
||||||
|
<string name="last_trades_example">[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</string>
|
||||||
|
|
||||||
|
<string name="log_example">[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?</string>
|
||||||
|
<string name="exchange_1_log_title">Binance log</string>
|
||||||
|
<string name="exchange_2_log_title">Gate.io log</string>
|
||||||
|
<string name="exchange_3_log_title">Kucoin log</string>
|
||||||
|
<string name="exchange_4_log_title">OKX log</string>
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue