diff --git a/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java b/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java
index 16f734e..228c6c9 100644
--- a/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java
+++ b/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java
@@ -65,20 +65,14 @@ import java.util.Locale;
//Use WilliamChart for charts https://github.com/diogobernardino/WilliamChart
//Auto refresh with predefined intervals
-//Adding manually currencies (date, purchased price)
//Multiple portfolio (exchanges & custom)
-//Add currency details (market cap, 1h, 3h, 1d, 3d, 1w, 1m, 3m, 1y)
//Add roadmap to buy a coin
//Add reddit link ?
//
public class HomeActivity extends AppCompatActivity {
- private PreferencesManager preferencesManager;
-
private CollapsingToolbarLayout toolbarLayout;
- private ViewFlipper viewFlipper;
- private HomeLayoutGenerator layoutGenerator;
private BottomNavigationView bottomNavigationView;
private ViewPager viewPager;
@@ -151,11 +145,9 @@ public class HomeActivity extends AppCompatActivity {
});
//Objects initialization
- preferencesManager = new PreferencesManager(this);
//Layouts setup
toolbarLayout = findViewById(R.id.toolbar_layout);
- viewFlipper = findViewById(R.id.viewFlipperSummary);
bottomNavigationView = findViewById(R.id.navigationSummary);
bottomNavigationView.setOnNavigationItemSelectedListener(onNavigationItemSelectedListener);
@@ -175,75 +167,12 @@ public class HomeActivity extends AppCompatActivity {
});
}
- private void switchMainView()
- {
- Log.d("coinfolio", "Should");
- ((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(true, true);
- findViewById(R.id.swiperefresh).setNestedScrollingEnabled(true);
-
- findViewById(R.id.toolbar_layout).setFocusable(true);
- ((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(true, true);
- ((AppBarLayout) findViewById(R.id.app_bar)).setActivated(true);
- findViewById(R.id.app_bar).setClickable(true);
- findViewById(R.id.nestedScrollViewLayout).setNestedScrollingEnabled(true);
-
- findViewById(R.id.app_bar).setEnabled(true);
- findViewById(R.id.toolbar_layout).setNestedScrollingEnabled(true);
- findViewById(R.id.coordinatorLayout).setNestedScrollingEnabled(true);
-
- findViewById(R.id.switch_button).setVisibility(View.VISIBLE);
-
- viewFlipper.setDisplayedChild(1);
- }
-
- private void switchSecondaryViews(int itemIndex)
- {
- Log.d("coinfolio", "Should not");
- ((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(false, true);
- findViewById(R.id.swiperefresh).setNestedScrollingEnabled(false);
-
- findViewById(R.id.toolbar_layout).setFocusable(false);
- ((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(false, true);
- ((AppBarLayout) findViewById(R.id.app_bar)).setActivated(false);
- findViewById(R.id.app_bar).setClickable(false);
- findViewById(R.id.nestedScrollViewLayout).setNestedScrollingEnabled(false);
-
- findViewById(R.id.app_bar).setEnabled(false);
- findViewById(R.id.toolbar_layout).setNestedScrollingEnabled(false);
- findViewById(R.id.coordinatorLayout).setNestedScrollingEnabled(false);
-
- findViewById(R.id.switch_button).setVisibility(View.GONE);
-
- viewFlipper.setDisplayedChild(itemIndex);
- }
-
@Override
protected void onResume() {
super.onResume();
}
- private void addTestWatchlistCardview()
- {
- View view = LayoutInflater.from(this).inflate(R.layout.cardview_watchlist, null);
-
- ((TextView) view.findViewById(R.id.currencyFluctuationPercentageTextView)).setText("3%");
- ((TextView) view.findViewById(R.id.currencyFluctuationTextView)).setText("$3");
- ((TextView) view.findViewById(R.id.currencyNameTextView)).setText("TanguyCoin");
- ((TextView) view.findViewById(R.id.currencySymbolTextView)).setText("TGC");
- ((TextView) view.findViewById(R.id.currencyValueTextView)).setText("$100");
-
- view.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
- view.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Log.d("coinfolio", "Clicked !");
- }
- });
-
- ((LinearLayout) findViewById(R.id.linearLayoutWatchlist)).addView(view);
- }
-
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
diff --git a/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java b/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java
index ceb0ab1..3c2fdd9 100644
--- a/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java
+++ b/app/src/main/java/com/nauk/coinfolio/DataManagers/CurrencyData/Currency.java
@@ -106,6 +106,7 @@ public class Currency implements Parcelable {
if(dataChart != null)
{
+ Log.d("coinfolio", "Success for : " + symbol);
setValue(dataChart.get(dataChart.size() - 1).getClose());
updateDayFluctuation();
}
diff --git a/app/src/main/java/com/nauk/coinfolio/PagerAdapter.java b/app/src/main/java/com/nauk/coinfolio/PagerAdapter.java
index d098777..3a53edb 100644
--- a/app/src/main/java/com/nauk/coinfolio/PagerAdapter.java
+++ b/app/src/main/java/com/nauk/coinfolio/PagerAdapter.java
@@ -1,7 +1,5 @@
package com.nauk.coinfolio;
-import android.app.Dialog;
-import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
@@ -46,4 +44,4 @@ public class PagerAdapter extends FragmentStatePagerAdapter {
public int getCount() {
return numOfTabs;
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_currency_details.xml b/app/src/main/res/layout/activity_currency_details.xml
index b476d46..31d4521 100644
--- a/app/src/main/res/layout/activity_currency_details.xml
+++ b/app/src/main/res/layout/activity_currency_details.xml
@@ -44,7 +44,8 @@
@@ -57,21 +58,23 @@
-
+ android:layout_height="match_parent"
+ android:layout_weight="0.5"/>
@@ -184,8 +197,10 @@
+ android:layout_height="match_parent"
+ android:layout_weight="0.7"
+ android:orientation="horizontal"
+ android:paddingStart="4dp">
@@ -210,6 +226,7 @@
android:id="@+id/txtViewPriceStart"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:autoSizeTextType="uniform"
android:layout_weight="0.5"/>
@@ -223,6 +240,7 @@
@@ -231,6 +249,7 @@
android:id="@+id/txtViewPriceNow"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:autoSizeTextType="uniform"
android:layout_weight="0.5"/>
@@ -244,6 +263,7 @@
@@ -252,6 +272,7 @@
android:id="@+id/txtViewPercentage"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:autoSizeTextType="uniform"
android:layout_weight="0.5"/>
@@ -273,6 +294,7 @@
@@ -281,6 +303,7 @@
android:id="@+id/totalVolume"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:autoSizeTextType="uniform"
android:layout_weight="0.5" />
@@ -294,6 +317,7 @@
@@ -302,6 +326,7 @@
android:id="@+id/highestPrice"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:autoSizeTextType="uniform"
android:layout_weight="0.5" />
@@ -315,6 +340,7 @@
@@ -323,6 +349,7 @@
android:id="@+id/lowestPrice"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:autoSizeTextType="uniform"
android:layout_weight="0.5" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f885ec0..ac69f1e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -123,7 +123,7 @@
Watchlist
Infos
Transactions
- Home
+ Holdings
Market Capitalization