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 89edcb7..7b9ea90 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
@@ -8,7 +8,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
-import androidx.lifecycle.ViewModelProvider;
import com.example.dcav2gui.R;
import com.example.dcav2gui.databinding.FragmentHomeBinding;
@@ -19,15 +18,10 @@ public class HomeFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
- HomeViewModel homeViewModel =
- new ViewModelProvider(this).get(HomeViewModel.class);
binding = FragmentHomeBinding.inflate(inflater, container, false);
View root = binding.getRoot();
- //final TextView textView = binding.textHome;
- //homeViewModel.getText().observe(getViewLifecycleOwner(), textView::setText);
-
// Bind text views
TextView pricePair1 = root.findViewById(R.id.pricesCardPrice1);
TextView pricePair124hPercentage = root.findViewById(R.id.pricesCard24hText1);
@@ -46,17 +40,17 @@ public class HomeFragment extends Fragment {
// Set text values
pricePair1.setText(R.string.default_price_ticker_1);
- pricePair124hPercentage.setText("+20.30%");
- pricePair17dPercentage.setText("+20.30%");
- pricePair130dPercentage.setText("+20.30%");
+ 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("+20.30%");
- pricePair27dPercentage.setText("+20.30%");
- pricePair230dPercentage.setText("+20.30%");
+ 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("+20.30%");
- pricePair37dPercentage.setText("+20.30%");
- pricePair330dPercentage.setText("+20.30%");
+ pricePair324hPercentage.setText(R.string.percentage_example);
+ pricePair37dPercentage.setText(R.string.percentage_example);
+ pricePair330dPercentage.setText(R.string.percentage_example);
return root;
}
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
index babd001..732e2d6 100644
--- a/app/src/main/res/layout/fragment_home.xml
+++ b/app/src/main/res/layout/fragment_home.xml
@@ -1,6 +1,6 @@
@@ -48,7 +48,7 @@
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
- android:text="24h"
+ android:text="@string/h_24_title"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
@@ -111,7 +111,7 @@
android:id="@+id/pricesCardPrice2"
android:layout_width="96dp"
android:layout_height="24dp"
- android:text="696969.69"
+ android:text="@string/default_price_ticker_2"
android:textAlignment="center"
android:textSize="18sp"
android:textStyle="bold" />
@@ -128,7 +128,7 @@
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
- android:text="24h"
+ android:text="@string/h_24_title"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
@@ -191,7 +191,7 @@
android:id="@+id/pricesCardPrice3"
android:layout_width="96dp"
android:layout_height="24dp"
- android:text="696969.69"
+ android:text="@string/default_price_ticker_3"
android:textAlignment="center"
android:textSize="18sp"
android:textStyle="bold" />
@@ -208,7 +208,7 @@
android:layout_width="22dp"
android:layout_height="16dp"
android:textAlignment="textEnd"
- android:text="24h"
+ android:text="@string/h_24_title"
android:textColor="@color/secondary_text_color"
android:textSize="12sp" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7facde4..e4a0db4 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -43,4 +43,8 @@
USDT
USDT
ARS
+ 24h
+ 7d
+ 30d
+ +20.30%
\ No newline at end of file