This commit is contained in:
Nicolás Sánchez 2024-12-16 19:17:13 -03:00
parent 6a5f456598
commit a4767708dd
4 changed files with 14 additions and 11 deletions

View File

@ -9,6 +9,8 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.example.dcav2gui.R;
import com.example.dcav2gui.databinding.FragmentBinanceBinding;
import com.example.dcav2gui.ui.exchanges.adapters.WorkerCardAdapter;

View File

@ -33,11 +33,13 @@ public class BinanceViewModel extends AndroidViewModel {
try {
Thread.sleep(5000);
// Fetch and update the data
fetchWorkerData();
List<WorkerData> newData = null; // Implement this method to fetch actual data
workerDataList.setValue(newData);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}).start();
}
}

View File

@ -1,22 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.exchanges.GateioFragment">
tools:context=".ui.exchanges.BinanceFragment">
<TextView
android:id="@+id/text_binance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -15,6 +15,7 @@ firebaseCrashlyticsBuildtools = "3.0.2"
okhttp = "3.14.6"
okhttpVersion = "4.9.2"
recyclerview = "1.3.2"
recyclerviewVersion = "1.2.1"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
@ -32,6 +33,7 @@ firebase-crashlytics-buildtools = { group = "com.google.firebase", name = "fireb
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp-v492 = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttpVersion" }
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
recyclerview-v121 = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerviewVersion" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }