Price percentages improvement

This commit is contained in:
Nicolás Sánchez 2024-12-10 16:40:56 -03:00
parent d38ea199ca
commit b59f0b9108
3 changed files with 156 additions and 19 deletions

View File

@ -30,19 +30,33 @@ public class HomeFragment extends Fragment {
// Bind text views
TextView pricePair1 = root.findViewById(R.id.pricesCardPrice1);
TextView pricePair1Percentages = root.findViewById(R.id.pricesCardPercentages1);
TextView pricePair124hPercentage = root.findViewById(R.id.pricesCard24hText1);
TextView pricePair17dPercentage = root.findViewById(R.id.pricesCard7dText1);
TextView pricePair130dPercentage = root.findViewById(R.id.pricesCard30dText1);
TextView pricePair2 = root.findViewById(R.id.pricesCardPrice2);
TextView pricePair2Percentages = root.findViewById(R.id.pricesCardPercentages2);
TextView pricePair224hPercentage = root.findViewById(R.id.pricesCard24hText2);
TextView pricePair27dPercentage = root.findViewById(R.id.pricesCard7dText2);
TextView pricePair230dPercentage = root.findViewById(R.id.pricesCard30dText2);
TextView pricePair3 = root.findViewById(R.id.pricesCardPrice3);
TextView pricePair3Percentages = root.findViewById(R.id.pricesCardPercentages3);
TextView pricePair324hPercentage = root.findViewById(R.id.pricesCard24hText3);
TextView pricePair37dPercentage = root.findViewById(R.id.pricesCard7dText3);
TextView pricePair330dPercentage = root.findViewById(R.id.pricesCard30dText3);
// Set text values
pricePair1.setText("696969.35");
pricePair1Percentages.setText("24h +100% 7d +100% 30d +100%");
pricePair2.setText("69696.93");
pricePair2Percentages.setText("24h +100% 7d +100% 30d +100%");
pricePair3.setText("1000.35");
pricePair3Percentages.setText("24h +100% 7d +100% 30d +100%");
pricePair1.setText(R.string.default_price_ticker_1);
pricePair124hPercentage.setText("+20.30%");
pricePair17dPercentage.setText("+20.30%");
pricePair130dPercentage.setText("+20.30%");
pricePair2.setText(R.string.default_price_ticker_2);
pricePair224hPercentage.setText("+20.30%");
pricePair27dPercentage.setText("+20.30%");
pricePair230dPercentage.setText("+20.30%");
pricePair3.setText(R.string.default_price_ticker_3);
pricePair324hPercentage.setText("+20.30%");
pricePair37dPercentage.setText("+20.30%");
pricePair330dPercentage.setText("+20.30%");
return root;
}

View File

@ -44,11 +44,51 @@
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/pricesCardPercentages1"
android:layout_width="220dp"
android:id="@+id/pricesCard24hLabel1"
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="24h +100% 7d +100% 30d +100%"
android:text="24h"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard24hText1"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/pricesCard7dLabel1"
android:layout_width="14dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="7d"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard7dText1"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/pricesCard30dLabel1"
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="30d"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard30dText1"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
</LinearLayout>
@ -84,11 +124,51 @@
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/pricesCardPercentages2"
android:layout_width="220dp"
android:id="@+id/pricesCard24hLabel2"
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="24h +100% 7d +100% 30d +100%"
android:text="24h"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard24hText2"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/pricesCard7dLabel2"
android:layout_width="14dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="7d"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard7dText2"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/pricesCard30dLabel2"
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="30d"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard30dText2"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
</LinearLayout>
@ -120,15 +200,55 @@
android:layout_width="32dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="@string/quote_price_ticker_2"
android:text="@string/quote_price_ticker_3"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/pricesCardPercentages3"
android:layout_width="220dp"
android:id="@+id/pricesCard24hLabel3"
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="24h +100% 7d +100% 30d +100%"
android:text="24h"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard24hText3"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/pricesCard7dLabel3"
android:layout_width="14dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="7d"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard7dText3"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/pricesCard30dLabel3"
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
android:text="30d"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
<TextView
android:id="@+id/pricesCard30dText3"
android:layout_width="56dp"
android:layout_height="16dp"
android:textAlignment="center"
android:text="+20.30%"
android:textColor="@color/secondary_text_color"
android:textSize="14sp" />
</LinearLayout>

View File

@ -35,8 +35,11 @@
<string name="general_settings_title">General settings</string>
<string name="base_price_ticker_1">BTC</string>
<string name="default_price_ticker_1">150000.00</string>
<string name="base_price_ticker_2">ETH</string>
<string name="default_price_ticker_2">15000.00</string>
<string name="base_price_ticker_3">USDT</string>
<string name="default_price_ticker_3">1500.00</string>
<string name="quote_price_ticker_1">USDT</string>
<string name="quote_price_ticker_2">USDT</string>
<string name="quote_price_ticker_3">ARS</string>