EarnerData class
This commit is contained in:
parent
46f7f1fa95
commit
48e2eaa125
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.example.dcav2gui;
|
||||||
|
|
||||||
|
public class EarnerInterface {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.example.dcav2gui.ui.earners;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
public class EarnFragment extends Fragment {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.example.dcav2gui.ui.earners;
|
||||||
|
|
||||||
|
public class EarnViewModel {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.example.dcav2gui.ui.earners;
|
||||||
|
|
||||||
|
public class EarnerCardAdapter {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.example.dcav2gui.ui.earners;
|
||||||
|
|
||||||
|
public class EarnerData {
|
||||||
|
private final String brokerName;
|
||||||
|
private final double tradingBalance;
|
||||||
|
private final double earningBalance;
|
||||||
|
private final boolean isPaused;
|
||||||
|
private final double stepSize;
|
||||||
|
private final double percentage;
|
||||||
|
private final double minimumAmountInTradingAccount;
|
||||||
|
private final double timeBetweenSubscriptions;
|
||||||
|
private final double timeBetweenRedemptions;
|
||||||
|
private final double lastSubscription;
|
||||||
|
private final double lastRedemption;
|
||||||
|
|
||||||
|
public EarnerData(String brokerName, double tradingBalance, double earningBalance, boolean isPaused, double stepSize, double percentage, double minimumAmountInTradingAccount,
|
||||||
|
double timeBetweenSubscriptions, double timeBetweenRedemptions, double lastSubscription, double lastRedemption) {
|
||||||
|
this.brokerName = brokerName;
|
||||||
|
this.tradingBalance = tradingBalance;
|
||||||
|
this.earningBalance = earningBalance;
|
||||||
|
this.isPaused = isPaused;
|
||||||
|
this.stepSize = stepSize;
|
||||||
|
this.percentage = percentage;
|
||||||
|
this.minimumAmountInTradingAccount = minimumAmountInTradingAccount;
|
||||||
|
this.timeBetweenSubscriptions = timeBetweenSubscriptions;
|
||||||
|
this.timeBetweenRedemptions = timeBetweenRedemptions;
|
||||||
|
this.lastSubscription = lastSubscription;
|
||||||
|
this.lastRedemption = lastRedemption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrokerName() {return brokerName;}
|
||||||
|
public double getTradingBalance() {return tradingBalance;}
|
||||||
|
public double getEarningBalance() {return earningBalance;}
|
||||||
|
public double getPercentage() {return percentage;}
|
||||||
|
public boolean getIsPaused() {return isPaused;}
|
||||||
|
public double setStepSize() {return stepSize;}
|
||||||
|
public double getMinimumAmountInTradingAccount() {return minimumAmountInTradingAccount;}
|
||||||
|
public double getTimeBetweenSubscriptions() {return timeBetweenSubscriptions;}
|
||||||
|
public double getTimeBetweenRedemptions() {return timeBetweenRedemptions;}
|
||||||
|
public double getLastSubscription() {return lastSubscription;}
|
||||||
|
public double getLastRedemption() {return lastRedemption;}
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="24dp">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/earners_cards_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<!-- Each card will be added dynamically here -->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/earners_status_bar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/status_bar_background"
|
||||||
|
android:text="Loading..."
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:padding="6dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -24,5 +24,9 @@
|
||||||
android:id="@+id/nav_okx"
|
android:id="@+id/nav_okx"
|
||||||
android:icon="@drawable/ic_okx"
|
android:icon="@drawable/ic_okx"
|
||||||
android:title="@string/menu_okx" />
|
android:title="@string/menu_okx" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_earn"
|
||||||
|
android:icon="@drawable/piggy_bank"
|
||||||
|
android:title="Earn" />
|
||||||
</group>
|
</group>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
@ -35,6 +35,12 @@
|
||||||
android:label="@string/menu_okx"
|
android:label="@string/menu_okx"
|
||||||
tools:layout="@layout/fragment_okx" />
|
tools:layout="@layout/fragment_okx" />
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/nav_earn"
|
||||||
|
android:name="com.example.dcav2gui.ui.earners.EarnFragment"
|
||||||
|
android:label="Earn"
|
||||||
|
tools:layout="@layout/fragment_okx" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/nav_settings"
|
android:id="@+id/nav_settings"
|
||||||
android:name="com.example.dcav2gui.ui.settings.SettingsFragment"
|
android:name="com.example.dcav2gui.ui.settings.SettingsFragment"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue