Fix
This commit is contained in:
parent
1e945ec071
commit
7bd7d360d6
@ -11,6 +11,7 @@ import android.os.Looper;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.design.widget.CollapsingToolbarLayout;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
@ -78,13 +79,16 @@ public class HomeActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.navigation_home:
|
||||
//viewFlipper.setDisplayedChild(1);
|
||||
case R.id.navigation_something:
|
||||
|
||||
((FloatingActionButton) findViewById(R.id.floatingAddButton)).hide();
|
||||
return true;
|
||||
case R.id.navigation_view_list:
|
||||
((FloatingActionButton) findViewById(R.id.floatingAddButton)).show();
|
||||
//viewFlipper.setDisplayedChild(1);
|
||||
return true;
|
||||
case R.id.navigation_market_cap:
|
||||
((FloatingActionButton) findViewById(R.id.floatingAddButton)).hide();
|
||||
//viewFlipper.setDisplayedChild(2);
|
||||
return true;
|
||||
}
|
||||
@ -152,6 +156,8 @@ public class HomeActivity extends AppCompatActivity {
|
||||
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation_home);
|
||||
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||
navigation.setSelectedItemId(R.id.navigation_view_list);
|
||||
navigation.setFitsSystemWindows(true);
|
||||
navigation.setItemBackgroundResource(R.color.colorAccent);
|
||||
|
||||
//Events setup
|
||||
detailsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@ -338,14 +344,14 @@ public class HomeActivity extends AppCompatActivity {
|
||||
{
|
||||
iconCounter++;
|
||||
|
||||
Log.d("coinfolio", "Icon ++");
|
||||
Log.d("coinfolio", "Icon ++ " + iconCounter);
|
||||
|
||||
if(balanceManager.getTotalBalance() != null)
|
||||
{
|
||||
if(iconCounter == balanceManager.getTotalBalance().size() - 1)
|
||||
if(iconCounter == balanceManager.getTotalBalance().size())
|
||||
{
|
||||
Log.d("coinfolio", "1");
|
||||
if(coinCounter == balanceManager.getTotalBalance().size() - 1 && detailsChecker)
|
||||
if(coinCounter == balanceManager.getTotalBalance().size())
|
||||
{
|
||||
Log.d("coinfolio", "Loading heavy");
|
||||
|
||||
@ -425,8 +431,10 @@ public class HomeActivity extends AppCompatActivity {
|
||||
|
||||
if(balanceManager.getTotalBalance() != null)
|
||||
{
|
||||
if(coinCounter == balanceManager.getTotalBalance().size()-1)
|
||||
if(coinCounter == balanceManager.getTotalBalance().size())
|
||||
{
|
||||
Log.d("coinfolio", "Going through");
|
||||
|
||||
for (int i = 0; i < balanceManager.getTotalBalance().size(); i++)
|
||||
{
|
||||
final Currency localCurrency = balanceManager.getTotalBalance().get(i);
|
||||
|
@ -103,8 +103,11 @@
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/floatingAddButton"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:elevation="0dp"
|
||||
app:borderWidth="0dp"
|
||||
android:background="@color/cardview_light_background"
|
||||
android:src="@drawable/ic_add_white_24dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
|
@ -2,11 +2,7 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_pie_chart_black_24dp"
|
||||
android:title="@string/title_market_cap" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_home"
|
||||
android:id="@+id/navigation_something"
|
||||
android:icon="@drawable/ic_show_chart_black_24dp"
|
||||
android:title="@string/title_charts" />
|
||||
|
||||
@ -20,8 +16,4 @@
|
||||
android:icon="@drawable/ic_pie_chart_black_24dp"
|
||||
android:title="@string/title_market_cap" />
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_pie_chart_black_24dp"
|
||||
android:title="@string/title_market_cap" />
|
||||
|
||||
</menu>
|
||||
|
Loading…
Reference in New Issue
Block a user