FIx 1month detail crash
This commit is contained in:
parent
c9e7f8f21d
commit
dc0dedca73
@ -243,7 +243,7 @@ public class CurrencyDetailsActivity extends AppCompatActivity {
|
||||
});
|
||||
break;
|
||||
case "1M":
|
||||
currency.updateHistoryDays(this, new Currency.CurrencyCallBack() {
|
||||
currency.updateHistoryHours(this, new Currency.CurrencyCallBack() {
|
||||
@Override
|
||||
public void onSuccess(Currency currency) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@ -398,6 +398,7 @@ public class CurrencyDetailsActivity extends AppCompatActivity {
|
||||
{
|
||||
case 1:
|
||||
dataChartList = currency.getHistoryHours();
|
||||
Log.d("coinfolio", "1 month");
|
||||
offset = 124;
|
||||
pointFormat = MONTH;
|
||||
break;
|
||||
|
@ -140,7 +140,8 @@ public class HomeActivity extends AppCompatActivity {
|
||||
|
||||
//Setup main interface
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||
//this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
setContentView(R.layout.activity_currency_summary);
|
||||
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
|
||||
|
||||
@ -185,8 +186,6 @@ public class HomeActivity extends AppCompatActivity {
|
||||
ImageButton detailsButton = findViewById(R.id.switch_button);
|
||||
ImageButton settingsButton = findViewById(R.id.settings_button);
|
||||
|
||||
toolbarLayout.setExpandedTitleGravity(Gravity.CENTER);
|
||||
toolbarLayout.setCollapsedTitleGravity(Gravity.CENTER);
|
||||
toolbarLayout.setForegroundGravity(Gravity.CENTER);
|
||||
toolbarLayout.setTitle("US$0.00");
|
||||
|
||||
|
@ -154,13 +154,12 @@ public class HomeLayoutGenerator {
|
||||
if(currency.getHistoryMinutes() != null)
|
||||
{
|
||||
view.findViewById(R.id.LineChartView).setVisibility(View.VISIBLE);
|
||||
((LineChart) view.findViewById(R.id.LineChartView)).invalidate();
|
||||
view.findViewById(R.id.LineChartView).invalidate();
|
||||
view.findViewById(R.id.errorTextView).setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
view.findViewById(R.id.LineChartView).setVisibility(View.GONE);
|
||||
|
||||
view.findViewById(R.id.errorTextView).setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,10 @@
|
||||
android:fitsSystemWindows="true"
|
||||
app:contentScrim="@drawable/gradient_background"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:toolbarId="@+id/toolbar">
|
||||
app:toolbarId="@+id/toolbar"
|
||||
app:collapsedTitleGravity="center"
|
||||
app:expandedTitleGravity="center"
|
||||
app:titleEnabled="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbarSubtitle"
|
||||
@ -38,7 +41,7 @@
|
||||
android:layout_gravity="center|bottom"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20dp"
|
||||
android:textSize="20sp"
|
||||
app:layout_collapseMode="parallax"/>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
@ -46,16 +49,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
android:layout_marginStart="-30dp">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<LinearLayout
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="pin"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="left"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<ImageButton
|
||||
@ -63,26 +65,18 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/quick_button"
|
||||
android:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="pin"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="right"
|
||||
android:layout_margin="10dp">
|
||||
android:visibility="visible"
|
||||
android:layout_gravity="start"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/settings_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_settings"
|
||||
android:visibility="visible"/>
|
||||
android:visibility="visible"
|
||||
android:layout_gravity="end"/>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
@ -82,7 +82,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/marketCapTextView"
|
||||
|
@ -153,5 +153,6 @@
|
||||
|
||||
<string name="market_cap_textview">Total Market Capitalization :\nUS$%1$s</string>
|
||||
<string name="volume_market_cap_textview">24h volume :\nUS$%1$s</string>
|
||||
<string name="title_activity_scrolling">ScrollingActivity</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1,18 +1,25 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="swirl_ridgeColor">@color/separationLine</item>
|
||||
<item name="swirl_errorColor">@color/decrease</item>
|
||||
<!--<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:statusBarColor">@color/transparent</item>-->
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<!--<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:actionBarStyle">@style/ThemeActionBar</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>-->
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
@ -24,4 +31,11 @@
|
||||
<item name="android:windowExitAnimation">@anim/zoom_in</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
|
||||
<item name="android:background"> @null </item>
|
||||
<item name="background">@null</item>
|
||||
<item name="android:displayOptions"> showHome|useLogo</item>
|
||||
<item name="displayOptions">showHome|useLogo</item>
|
||||
|
||||
</style>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user