SpaceNavigationView to BottomNavigationView
Switeched from SpaceNavigationView back to BottomNavigationView for the upcoming UI rework Added transaction adding button at the bottom of the currency list Reworked a bit of the loading sequence of the currency selection activity, more to come
This commit is contained in:
parent
f1a4a03a5a
commit
e9c2baab4c
@ -32,7 +32,6 @@ dependencies {
|
|||||||
implementation 'com.android.support:support-v4:27.1.0'
|
implementation 'com.android.support:support-v4:27.1.0'
|
||||||
implementation 'com.android.support:palette-v7:27.1.0'
|
implementation 'com.android.support:palette-v7:27.1.0'
|
||||||
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
|
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
|
||||||
implementation 'com.github.armcha:SpaceNavigationView:1.6.0'
|
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.5'
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.5'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.5'
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.5'
|
||||||
|
@ -10,7 +10,6 @@ import android.graphics.drawable.BitmapDrawable;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.SwitchPreference;
|
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.BottomNavigationView;
|
import android.support.design.widget.BottomNavigationView;
|
||||||
import android.support.v4.app.NavUtils;
|
import android.support.v4.app.NavUtils;
|
||||||
@ -180,8 +179,6 @@ public class CurrencyDetailsActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
((BottomNavigationView) findViewById(R.id.navigation_details)).getMenu().getItem(1).setEnabled(false);
|
|
||||||
|
|
||||||
setupActionBar();
|
setupActionBar();
|
||||||
|
|
||||||
drawTransactionList();
|
drawTransactionList();
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package com.nauk.coinfolio.Activities;
|
package com.nauk.coinfolio.Activities;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Looper;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -25,6 +27,7 @@ public class CurrencySelectionActivity extends AppCompatActivity implements Sear
|
|||||||
private CurrencyListAdapter adapter;
|
private CurrencyListAdapter adapter;
|
||||||
private ListView listView;
|
private ListView listView;
|
||||||
private android.widget.Filter filter;
|
private android.widget.Filter filter;
|
||||||
|
private Intent comingIntent;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -35,18 +38,12 @@ public class CurrencySelectionActivity extends AppCompatActivity implements Sear
|
|||||||
|
|
||||||
setContentView(R.layout.activity_add_currency);
|
setContentView(R.layout.activity_add_currency);
|
||||||
|
|
||||||
Intent intent = getIntent();
|
comingIntent = getIntent();
|
||||||
|
|
||||||
currencySymbols = intent.getStringArrayExtra("currencyListSymbols");
|
|
||||||
currencyNames = intent.getStringArrayExtra("currencyListNames");
|
|
||||||
|
|
||||||
setTitle("Select a coin");
|
setTitle("Select a coin");
|
||||||
|
|
||||||
setupAdapter();
|
ListLoader listLoader = new ListLoader();
|
||||||
|
listLoader.execute();
|
||||||
setupList();
|
|
||||||
|
|
||||||
setupSearchView();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupSearchView()
|
private void setupSearchView()
|
||||||
@ -141,4 +138,51 @@ public class CurrencySelectionActivity extends AppCompatActivity implements Sear
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class ListLoader extends AsyncTask<Void, Integer, Void>
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
protected void onPreExecute()
|
||||||
|
{
|
||||||
|
super.onPreExecute();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onProgressUpdate(Integer... values)
|
||||||
|
{
|
||||||
|
super.onProgressUpdate(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Void doInBackground(Void... params)
|
||||||
|
{
|
||||||
|
if(Looper.myLooper() == null)
|
||||||
|
{
|
||||||
|
Looper.prepare();
|
||||||
|
}
|
||||||
|
|
||||||
|
currencySymbols = comingIntent.getStringArrayExtra("currencyListSymbols");
|
||||||
|
currencyNames = comingIntent.getStringArrayExtra("currencyListNames");
|
||||||
|
|
||||||
|
setupAdapter();
|
||||||
|
|
||||||
|
setupList();
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
setupSearchView();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostExecute(Void result)
|
||||||
|
{
|
||||||
|
findViewById(R.id.coinsPreview).setVisibility(View.VISIBLE);
|
||||||
|
findViewById(R.id.currencyListProgressBar).setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,10 @@ import android.os.AsyncTask;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
|
import android.support.design.widget.BottomNavigationView;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
import android.support.design.widget.CollapsingToolbarLayout;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
@ -27,6 +28,7 @@ import android.view.MenuItem;
|
|||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
@ -38,9 +40,6 @@ import com.github.mikephil.charting.data.PieData;
|
|||||||
import com.github.mikephil.charting.data.PieDataSet;
|
import com.github.mikephil.charting.data.PieDataSet;
|
||||||
import com.github.mikephil.charting.data.PieEntry;
|
import com.github.mikephil.charting.data.PieEntry;
|
||||||
import com.github.mikephil.charting.formatter.PercentFormatter;
|
import com.github.mikephil.charting.formatter.PercentFormatter;
|
||||||
import com.luseen.spacenavigation.SpaceItem;
|
|
||||||
import com.luseen.spacenavigation.SpaceNavigationView;
|
|
||||||
import com.luseen.spacenavigation.SpaceOnClickListener;
|
|
||||||
import com.nauk.coinfolio.DataManagers.BalanceManager;
|
import com.nauk.coinfolio.DataManagers.BalanceManager;
|
||||||
import com.nauk.coinfolio.DataManagers.CurrencyData.Currency;
|
import com.nauk.coinfolio.DataManagers.CurrencyData.Currency;
|
||||||
import com.nauk.coinfolio.DataManagers.MarketCapManager;
|
import com.nauk.coinfolio.DataManagers.MarketCapManager;
|
||||||
@ -94,9 +93,32 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
private Runnable updateRunnable;
|
private Runnable updateRunnable;
|
||||||
private ViewFlipper viewFlipper;
|
private ViewFlipper viewFlipper;
|
||||||
private HomeLayoutGenerator layoutGenerator;
|
private HomeLayoutGenerator layoutGenerator;
|
||||||
|
private BottomNavigationView bottomNavigationView;
|
||||||
|
|
||||||
private HashMap<String, Integer> dominantCurrenciesColors;
|
private HashMap<String, Integer> dominantCurrenciesColors;
|
||||||
|
|
||||||
|
private BottomNavigationView.OnNavigationItemSelectedListener onNavigationItemSelectedListener
|
||||||
|
= new BottomNavigationView.OnNavigationItemSelectedListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||||
|
item.setChecked(true);
|
||||||
|
switch (item.getItemId())
|
||||||
|
{
|
||||||
|
case R.id.navigation_watchlist:
|
||||||
|
switchSecondaryViews(0);
|
||||||
|
break;
|
||||||
|
case R.id.navigation_currencies_list:
|
||||||
|
switchMainView();
|
||||||
|
break;
|
||||||
|
case R.id.navigation_market_cap:
|
||||||
|
switchSecondaryViews(2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@ -107,7 +129,7 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
//requestWindowFeature(Window.FEATURE_NO_TITLE);
|
//requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
//getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
//getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||||
//this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
//this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
//getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||||
|
|
||||||
setContentView(R.layout.activity_currency_summary);
|
setContentView(R.layout.activity_currency_summary);
|
||||||
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
|
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
|
||||||
@ -146,11 +168,14 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
toolbarSubtitle = findViewById(R.id.toolbarSubtitle);
|
toolbarSubtitle = findViewById(R.id.toolbarSubtitle);
|
||||||
currencyLayout = findViewById(R.id.currencyListLayout);
|
currencyLayout = findViewById(R.id.currencyListLayout);
|
||||||
viewFlipper = findViewById(R.id.viewFlipperSummary);
|
viewFlipper = findViewById(R.id.viewFlipperSummary);
|
||||||
viewFlipper.setDisplayedChild(1);
|
|
||||||
|
bottomNavigationView = findViewById(R.id.navigationSummary);
|
||||||
|
bottomNavigationView.setOnNavigationItemSelectedListener(onNavigationItemSelectedListener);
|
||||||
|
bottomNavigationView.setSelectedItemId(R.id.navigation_currencies_list);
|
||||||
|
|
||||||
layoutGenerator = new HomeLayoutGenerator(this);
|
layoutGenerator = new HomeLayoutGenerator(this);
|
||||||
|
|
||||||
ImageButton addCurrencyButton = findViewById(R.id.floatingAddButton);
|
Button addCurrencyButton = findViewById(R.id.buttonAddTransaction);
|
||||||
ImageButton detailsButton = findViewById(R.id.switch_button);
|
ImageButton detailsButton = findViewById(R.id.switch_button);
|
||||||
ImageButton settingsButton = findViewById(R.id.settings_button);
|
ImageButton settingsButton = findViewById(R.id.settings_button);
|
||||||
|
|
||||||
@ -223,8 +248,6 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
lastTimestamp = 0;
|
lastTimestamp = 0;
|
||||||
|
|
||||||
setupNavBar(savedInstanceState);
|
|
||||||
|
|
||||||
setupDominantCurrenciesColors();
|
setupDominantCurrenciesColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,43 +322,8 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
dominantCurrenciesColors.put("ETC", -10448784);
|
dominantCurrenciesColors.put("ETC", -10448784);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupNavBar(Bundle savedInstanceState)
|
private void switchMainView()
|
||||||
{
|
{
|
||||||
final SpaceNavigationView spaceNavigationView = findViewById(R.id.space);
|
|
||||||
spaceNavigationView.initWithSaveInstanceState(savedInstanceState);
|
|
||||||
spaceNavigationView.addSpaceItem(new SpaceItem("WatchList", R.drawable.ic_remove_red_eye_black_24dp));
|
|
||||||
spaceNavigationView.addSpaceItem(new SpaceItem("Market Cap.", R.drawable.ic_pie_chart_black_24dp));
|
|
||||||
spaceNavigationView.setSpaceBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
|
||||||
spaceNavigationView.setCentreButtonIcon(R.drawable.ic_view_list_white_24dp);
|
|
||||||
spaceNavigationView.setCentreButtonColor(getResources().getColor(R.color.colorPrimary));
|
|
||||||
spaceNavigationView.setCentreButtonIconColorFilterEnabled(false);
|
|
||||||
spaceNavigationView.changeCurrentItem(-1);
|
|
||||||
|
|
||||||
spaceNavigationView.setSpaceOnClickListener(new SpaceOnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onCentreButtonClick() {
|
|
||||||
spaceNavigationCentreButtonEvent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onItemClick(int itemIndex, String itemName) {
|
|
||||||
spaceNavigationItemEvent(itemIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onItemReselected(int itemIndex, String itemName) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void spaceNavigationCentreButtonEvent()
|
|
||||||
{
|
|
||||||
//Toast.makeText(MainActivity.this,"onCentreButtonClick", Toast.LENGTH_SHORT).show();
|
|
||||||
((FloatingActionButton) findViewById(R.id.floatingAddButton)).show();
|
|
||||||
SpaceNavigationView nav = findViewById(R.id.space);
|
|
||||||
|
|
||||||
nav.changeCurrentItem(-1);
|
|
||||||
|
|
||||||
findViewById(R.id.toolbar_layout).setFocusable(true);
|
findViewById(R.id.toolbar_layout).setFocusable(true);
|
||||||
((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(true, true);
|
((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(true, true);
|
||||||
findViewById(R.id.nestedScrollViewLayout).setNestedScrollingEnabled(true);
|
findViewById(R.id.nestedScrollViewLayout).setNestedScrollingEnabled(true);
|
||||||
@ -349,13 +337,8 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
viewFlipper.setDisplayedChild(1);
|
viewFlipper.setDisplayedChild(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void spaceNavigationItemEvent(int itemIndex)
|
private void switchSecondaryViews(int itemIndex)
|
||||||
{
|
{
|
||||||
((FloatingActionButton) findViewById(R.id.floatingAddButton)).hide();
|
|
||||||
((SpaceNavigationView) findViewById(R.id.space)).setCentreButtonIcon(R.drawable.ic_view_list_white_24dp);
|
|
||||||
|
|
||||||
//0 : Watchlist
|
|
||||||
//1 : Market cap
|
|
||||||
findViewById(R.id.toolbar_layout).setFocusable(false);
|
findViewById(R.id.toolbar_layout).setFocusable(false);
|
||||||
((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(false, true);
|
((AppBarLayout) findViewById(R.id.app_bar)).setExpanded(false, true);
|
||||||
findViewById(R.id.nestedScrollViewLayout).setNestedScrollingEnabled(false);
|
findViewById(R.id.nestedScrollViewLayout).setNestedScrollingEnabled(false);
|
||||||
@ -366,23 +349,12 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
findViewById(R.id.switch_button).setVisibility(View.GONE);
|
findViewById(R.id.switch_button).setVisibility(View.GONE);
|
||||||
|
|
||||||
viewFlipper.setDisplayedChild(itemIndex * 2);
|
viewFlipper.setDisplayedChild(itemIndex);
|
||||||
|
|
||||||
if(itemIndex == 1)
|
|
||||||
{
|
|
||||||
((PieChart) findViewById(R.id.marketCapPieChart)).animateX(1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onSaveInstanceState(Bundle outState) {
|
|
||||||
super.onSaveInstanceState(outState);
|
|
||||||
((SpaceNavigationView) findViewById(R.id.space)).onSaveInstanceState(outState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showErrorSnackbar()
|
private void showErrorSnackbar()
|
||||||
{
|
{
|
||||||
Snackbar.make(findViewById(R.id.currencyListLayout), "Error while updating data", Snackbar.LENGTH_LONG)
|
Snackbar.make(findViewById(R.id.viewFlipperSummary), "Error while updating data", Snackbar.LENGTH_LONG)
|
||||||
.setAction("Update", new View.OnClickListener() {
|
.setAction("Update", new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
@ -215,7 +215,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||||||
addPreferencesFromResource(R.xml.pref_general);
|
addPreferencesFromResource(R.xml.pref_general);
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
((SwitchPreference) findPreference("hide_balance")).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
findPreference("hide_balance").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
boolean isChecked = ((SwitchPreference) findPreference("hide_balance")).isChecked();
|
boolean isChecked = ((SwitchPreference) findPreference("hide_balance")).isChecked();
|
||||||
@ -267,7 +267,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||||||
bindPreferenceSummaryToValue(findPreference("hitbtc_privatekey"));
|
bindPreferenceSummaryToValue(findPreference("hitbtc_privatekey"));
|
||||||
bindPreferenceSummaryToValue(findPreference("binance_privatekey"));
|
bindPreferenceSummaryToValue(findPreference("binance_privatekey"));
|
||||||
|
|
||||||
((SwitchPreference) findPreference("enable_hitbtc")).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
findPreference("enable_hitbtc").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
boolean isChecked = ((SwitchPreference) findPreference("enable_hitbtc")).isChecked();
|
boolean isChecked = ((SwitchPreference) findPreference("enable_hitbtc")).isChecked();
|
||||||
@ -283,7 +283,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
((SwitchPreference) findPreference("enable_binance")).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
findPreference("enable_binance").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
boolean isChecked = ((SwitchPreference) findPreference("enable_binance")).isChecked();
|
boolean isChecked = ((SwitchPreference) findPreference("enable_binance")).isChecked();
|
||||||
|
14
app/src/main/res/drawable/button_dashed_background.xml
Normal file
14
app/src/main/res/drawable/button_dashed_background.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/transparent"/>
|
||||||
|
<corners android:radius="2dp"/>
|
||||||
|
<stroke
|
||||||
|
android:color="@color/separationColor"
|
||||||
|
android:width="2dp"
|
||||||
|
android:dashGap="4dp"
|
||||||
|
android:dashWidth="9dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
@ -4,6 +4,6 @@
|
|||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M4,14h4v-4L4,10v4zM4,19h4v-4L4,15v4zM4,9h4L8,5L4,5v4zM9,14h12v-4L9,10v4zM9,19h12v-4L9,15v4zM9,5v4h12L21,5L9,5z"/>
|
android:pathData="M4,14h4v-4L4,10v4zM4,19h4v-4L4,15v4zM4,9h4L8,5L4,5v4zM9,14h12v-4L9,10v4zM9,19h12v-4L9,15v4zM9,5v4h12L21,5L9,5z"/>
|
||||||
</vector>
|
</vector>
|
@ -22,7 +22,20 @@
|
|||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/coinsPreview"
|
android:id="@+id/coinsPreview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/currencyListProgressBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/separationLineSize"
|
android:layout_height="@dimen/separationLineSize"
|
||||||
android:background="@color/separationLine"/>
|
android:background="@color/separationColor"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -237,7 +237,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/separationLineSize"
|
android:layout_height="@dimen/separationLineSize"
|
||||||
android:background="@color/separationLine"/>
|
android:background="@color/separationColor"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -263,7 +263,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/separationLineSize"
|
android:layout_height="@dimen/separationLineSize"
|
||||||
android:background="@color/separationLine"/>
|
android:background="@color/separationColor"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -289,7 +289,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/separationLineSize"
|
android:layout_height="@dimen/separationLineSize"
|
||||||
android:background="@color/separationLine"/>
|
android:background="@color/separationColor"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -315,7 +315,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/separationLineSize"
|
android:layout_height="@dimen/separationLineSize"
|
||||||
android:background="@color/separationLine"/>
|
android:background="@color/separationColor"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,109 +1,95 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/coordinatorLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
tools:context="com.nauk.coinfolio.Activities.HomeActivity">
|
tools:context="com.nauk.coinfolio.Activities.HomeActivity">
|
||||||
|
|
||||||
<android.support.design.widget.CoordinatorLayout
|
|
||||||
android:id="@+id/coordinatorLayout"
|
<android.support.design.widget.AppBarLayout
|
||||||
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="@dimen/app_bar_height"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay"
|
||||||
|
android:background="@drawable/gradient_background">
|
||||||
|
|
||||||
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
<android.support.design.widget.AppBarLayout
|
android:id="@+id/toolbar_layout"
|
||||||
android:id="@+id/app_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/app_bar_height"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
android:theme="@style/AppTheme.AppBarOverlay"
|
|
||||||
android:background="@drawable/gradient_background"
|
|
||||||
android:elevation="10dp">
|
|
||||||
|
|
||||||
<android.support.design.widget.CollapsingToolbarLayout
|
|
||||||
android:id="@+id/toolbar_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
app:contentScrim="@drawable/gradient_background"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:toolbarId="@+id/toolbar"
|
|
||||||
app:collapsedTitleGravity="center"
|
|
||||||
app:expandedTitleGravity="center"
|
|
||||||
app:titleEnabled="true">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/toolbarSubtitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center|bottom"
|
|
||||||
android:layout_marginBottom="35dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="20sp"
|
|
||||||
app:layout_collapseMode="parallax"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
|
||||||
android:layout_marginStart="-30dp">
|
|
||||||
|
|
||||||
</android.support.v7.widget.Toolbar>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
android:layout_margin="10dp">
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/switch_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/quick_button"
|
|
||||||
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:layout_gravity="end"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</android.support.design.widget.CollapsingToolbarLayout>
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
|
||||||
|
|
||||||
<include layout="@layout/content_currency_summary" />
|
|
||||||
|
|
||||||
<com.luseen.spacenavigation.SpaceNavigationView
|
|
||||||
android:id="@+id/space"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="bottom"/>
|
android:fitsSystemWindows="true"
|
||||||
|
app:contentScrim="@drawable/gradient_background"
|
||||||
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
|
app:toolbarId="@+id/toolbar"
|
||||||
|
app:collapsedTitleGravity="center"
|
||||||
|
app:expandedTitleGravity="center"
|
||||||
|
app:titleEnabled="true">
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
<TextView
|
||||||
|
android:id="@+id/toolbarSubtitle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center|bottom"
|
||||||
|
android:layout_marginBottom="35dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_collapseMode="parallax"/>
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/floatingAddButton"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||||
|
android:layout_marginStart="-30dp">
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
|
android:layout_margin="10dp">
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/switch_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/quick_button"
|
||||||
|
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:layout_gravity="end"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
<include layout="@layout/content_currency_summary"/>
|
||||||
|
|
||||||
|
<android.support.design.widget.BottomNavigationView
|
||||||
|
android:id="@+id/navigationSummary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
app:borderWidth="0dp"
|
android:layout_marginStart="0dp"
|
||||||
android:backgroundTint="@color/colorPrimary"
|
android:background="?android:attr/windowBackground"
|
||||||
android:background="@color/cardview_light_background"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:src="@drawable/ic_add_white_24dp"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
android:layout_gravity="bottom|center_horizontal"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
android:clickable="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:focusable="true"
|
app:menu="@menu/navigation_home"
|
||||||
android:layout_margin="8dp"
|
android:layout_gravity="bottom" />
|
||||||
android:visibility="visible"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
@ -3,6 +3,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:paddingBottom="4dp">
|
android:paddingBottom="4dp">
|
||||||
@ -13,9 +14,9 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:backgroundTint="@color/cardview_background"
|
android:backgroundTint="@color/cardview_background"
|
||||||
android:elevation="@dimen/cardview_elevation"
|
|
||||||
app:cardCornerRadius="2dp"
|
app:cardCornerRadius="2dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
card_view:cardElevation="@dimen/cardview_elevation">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/mainLinear"
|
android:id="@+id/mainLinear"
|
||||||
@ -169,7 +170,7 @@
|
|||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:background="@color/separationLine" />
|
android:background="@color/separationColor" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:background="@color/separationLine" />
|
android:background="@color/separationColor" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
android:layout_marginBottom="50dp"
|
android:layout_marginBottom="56dp"
|
||||||
android:background="@color/summary_background">
|
android:background="@color/summary_background">
|
||||||
|
|
||||||
<ViewFlipper
|
<ViewFlipper
|
||||||
@ -16,7 +16,24 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayoutWatchlist"
|
android:id="@+id/linearLayoutWatchlist"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonAddWatchlist"
|
||||||
|
android:text="Add to watchlist"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/button_dashed_background"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:textColor="@color/separationColor"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"/>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="10dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBarWatchlist"
|
android:id="@+id/progressBarWatchlist"
|
||||||
@ -48,6 +65,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical" />
|
android:orientation="vertical" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/buttonAddTransaction"
|
||||||
|
android:text="Add transaction"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/button_dashed_background"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:textColor="@color/separationColor"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"/>
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="10dp" />
|
android:layout_height="10dp" />
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="2dp"
|
android:layout_height="2dp"
|
||||||
android:background="@color/separationLine"
|
android:background="@color/separationColor"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -9,6 +9,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_dashboard"
|
android:id="@+id/navigation_dashboard"
|
||||||
android:icon="@drawable/ic_dashboard_black_24dp"
|
android:icon="@drawable/ic_dashboard_black_24dp"
|
||||||
|
android:enabled="false"
|
||||||
android:title="@string/title_infos" />
|
android:title="@string/title_infos" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
android:title="@string/title_watchlist" />
|
android:title="@string/title_watchlist" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/navigation_view_list"
|
android:id="@+id/navigation_currencies_list"
|
||||||
android:icon="@drawable/ic_view_list_white_24dp"
|
android:icon="@drawable/ic_view_list_black_24dp"
|
||||||
android:title="@string/title_home" />
|
android:title="@string/title_home" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<color name="increase">#FF00E000</color>
|
<color name="increase">#FF00E000</color>
|
||||||
<color name="listBackground">#FFEEEEEE</color>
|
<color name="listBackground">#FFEEEEEE</color>
|
||||||
<color name="listBackground2">#FFFFFFFF</color>
|
<color name="listBackground2">#FFFFFFFF</color>
|
||||||
<color name="separationLine">#FF999999</color>
|
<color name="separationColor">#66999999</color>
|
||||||
<color name="buttonColor">#FFFFFFFF</color>
|
<color name="buttonColor">#FFFFFFFF</color>
|
||||||
<color name="red">#FFF44336</color>
|
<color name="red">#FFF44336</color>
|
||||||
<color name="green">#FF4CAF50</color>
|
<color name="green">#FF4CAF50</color>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="swirl_ridgeColor">@color/separationLine</item>
|
<item name="swirl_ridgeColor">@color/separationColor</item>
|
||||||
<item name="swirl_errorColor">@color/decrease</item>
|
<item name="swirl_errorColor">@color/decrease</item>
|
||||||
|
|
||||||
<!--<item name="android:windowTranslucentStatus">false</item>
|
<!--<item name="android:windowTranslucentStatus">false</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user