Fix app crash for SDK 19

This commit is contained in:
Tanguy Herbron 2018-08-15 04:14:04 +02:00
parent df9ab11410
commit 85dd10a177
21 changed files with 1382 additions and 17 deletions

2
.idea/gradle.xml generated
View File

@ -5,7 +5,7 @@
<GradleProjectSettings> <GradleProjectSettings>
<option name="distributionType" value="LOCAL" /> <option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-4.4" /> <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-4.9" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

18
.idea/misc.xml generated
View File

@ -1,5 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" value="F:/Export AS" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="true" />
<option name="OPTION_NAVIGATOR" value="true" />
<option name="OPTION_INDEX" value="true" />
<option name="OPTION_SEPARATE_INDEX" value="true" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
<option name="OPTION_DEPRECATED_LIST" value="true" />
<option name="OTHER_OPTIONS" />
<option name="HEAP_SIZE" />
<option name="LOCALE" />
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OPTION_INCLUDE_LIBS" value="false" />
</component>
<component name="NullableNotNullManager"> <component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" /> <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />

View File

@ -17,6 +17,7 @@ import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.GravityCompat; import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.AppCompatDelegate;
import android.util.Log; import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -49,6 +50,10 @@ import static com.herbron.moodl.MoodlBox.numberConformer;
public class HomeActivity extends AppCompatActivity implements BalanceUpdateInterface { public class HomeActivity extends AppCompatActivity implements BalanceUpdateInterface {
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
private DrawerLayout drawerLayout; private DrawerLayout drawerLayout;
private Fragment watchlistFragment; private Fragment watchlistFragment;
private Fragment holdingsFragment; private Fragment holdingsFragment;

View File

@ -22,6 +22,7 @@ import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat; import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.graphics.Palette; import android.support.v7.graphics.Palette;
import android.util.Log; import android.util.Log;
import android.view.Gravity; import android.view.Gravity;

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/separationColor">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/separationColor" />
<corners android:radius="2dp" />
</shape>
</item>
<item android:id="@android:id/background">
<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>
</ripple>

View File

@ -1,14 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" <selector xmlns:android="http://schemas.android.com/apk/res/android">
android:color="@color/separationColor">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/separationColor" />
<corners android:radius="2dp" />
</shape>
</item>
<item android:id="@android:id/background"> <item android:id="@android:id/background">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="@color/transparent"/> <solid android:color="@color/transparent"/>
@ -20,4 +11,4 @@
android:dashWidth="9dp"/> android:dashWidth="9dp"/>
</shape> </shape>
</item> </item>
</ripple> </selector>

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/record_transaction_layout_background_buy">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:id="@+id/input_amount"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/amount_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/activity_add_amount"/>
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:baselineAligned="false">
<android.support.design.widget.TextInputLayout
android:id="@+id/input_buyPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.5">
<android.support.design.widget.TextInputEditText
android:id="@+id/buyPrice_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/activity_purchase_price"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_buyDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<android.support.design.widget.TextInputEditText
android:id="@+id/buyDate_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/activity_purchase_date"
android:focusable="false"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_totalValue"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/totalValue_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/total_value"/>
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<android.support.design.widget.TextInputLayout
android:id="@+id/input_fees"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.7">
<android.support.design.widget.TextInputEditText
android:id="@+id/fees_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/activity_fees"/>
</android.support.design.widget.TextInputLayout>
<Spinner
android:id="@+id/feesCurrency_editText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_note"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/note_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/notes"
android:maxLines="4"
android:lines="4"
android:gravity="top"/>
</android.support.design.widget.TextInputLayout>
<android.support.v7.widget.AppCompatButton
android:id="@+id/saveBuyButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:text="@string/save"
android:layout_marginBottom="@dimen/mdtp_minimum_margin_top_bottom"
android:layout_gravity="end"
style="@style/Widget.AppCompat.Button.Colored"/>
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,278 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/chartsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/timeIntervalSinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Spinner"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<Button
android:text="@string/line_chart"
android:id="@+id/lineChartButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:enabled="false"
style="@style/Widget.AppCompat.Button.Colored"/>
<Button
android:text="@string/candle_stick_chart"
android:id="@+id/candleStickChartButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
style="@style/Widget.AppCompat.Button.Colored"/>
</LinearLayout>
<LinearLayout
android:id="@+id/progressLayoutChart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.405"
android:visibility="gone"
android:gravity="center">
<ProgressBar
android:id="@+id/progressBarChart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleLarge"
android:layout_gravity="center"
android:background="@drawable/circular_progress_bar"/>
</LinearLayout>
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chartPriceView"
android:layout_width="match_parent"
android:layout_height="200dp"
android:transitionName="chart"/>
<com.github.mikephil.charting.charts.CandleStickChart
android:id="@+id/chartCandleStickView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/timestampHightlight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_weight="0.33"
android:text="@string/backline" />
<TextView
android:id="@+id/priceHightlight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_weight="0.33"
android:text="@string/backline" />
<TextView
android:id="@+id/volumeHightlight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_weight="0.33"
android:text="@string/backline" />
</LinearLayout>
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/chartVolumeView"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_marginTop="5dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/llCharts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:baselineAligned="false"
android:gravity="bottom"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.16">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/beginning_price"
android:layout_weight="0.5"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewPriceStart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.16">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/current_price"
android:layout_weight="0.5"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewPriceNow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.16">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/delta"
android:layout_weight="0.5"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewPercentage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.16">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/total_volume"
android:layout_weight="0.5"
android:textStyle="bold"/>
<TextView
android:id="@+id/totalVolume"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.16">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/highest_price"
android:layout_weight="0.5"
android:textStyle="bold" />
<TextView
android:id="@+id/highestPrice"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.16">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/lowest_price"
android:layout_weight="0.5"
android:textStyle="bold"/>
<TextView
android:id="@+id/lowestPrice"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<LinearLayout
android:layout_width="@dimen/fingerprint_dialog_width"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/fingerprint_textview"
android:text="@string/fingerprint_dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/mainText"/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
<com.mattprecious.swirl.SwirlView
android:id="@+id/swirlBackground"
android:layout_width="@dimen/swirl_size"
android:layout_height="@dimen/swirl_size"
tools:swirl_state="on"/>
<com.mattprecious.swirl.SwirlView
android:id="@+id/swirl"
android:layout_width="@dimen/swirl_size"
android:layout_height="@dimen/swirl_size"
tools:swirl_state="on"/>
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:gravity="end">
<TextView
android:id="@+id/fingerprint_error"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:gravity="center"
android:textColor="@color/red"
android:layout_margin="5dp"/>
<Button
android:id="@+id/cancelButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/fingerprint_dialog_cancel"
style="?android:attr/borderlessButtonStyle"
android:layout_alignParentEnd="true"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/infosLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="6dp">
<TextView
android:id="@+id/txtViewPercentageCoinEmited"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"/>
<ProgressBar
android:id="@+id/percentageCoinEmited"
android:layout_width="match_parent"
android:layout_height="5dp"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_margin="5dp"
android:background="@drawable/rounded_corners"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/total_supply"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewTotalSupply"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/circulating_supply"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewCirculatingSupply"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/linearMarketCap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="0.5"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/market_capitalization"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewMarketCapitalization"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_value"/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearRank"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="0.5"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rank"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewRank"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_value"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/algorithm"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewAlgorithm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_value"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/proof_type"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewProofType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_value"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="0.5">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/start_date"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewStartDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_value"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/description"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtViewDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/gradient_background"
app:layout_collapseMode="pin"
app:elevation="0dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="pin"
android:layout_margin="10dp">
<ImageButton
android:id="@+id/drawer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp"
android:visibility="visible"
android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/title_market_cap"
android:textSize="18sp"
android:textColor="@color/white"
android:textStyle="bold"/>
</FrameLayout>
</android.support.v7.widget.Toolbar>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swiperefreshmarketcap"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:background="@drawable/gradient_background">
<LinearLayout android:id="@+id/layoutMarketCap"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="20dp"
android:background="@drawable/list_background">
<ProgressBar
android:id="@+id/progressBarMarketCap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleLarge"
android:layout_gravity="center"
android:background="@drawable/circular_progress_bar" />
<LinearLayout
android:id="@+id/layoutProgressMarketCap"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="350dp"
android:layout_marginTop="5dp">
<com.herbron.moodl.CustomLayouts.CustomPieChart
android:id="@+id/marketCapPieChart"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/currencyIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:layout_gravity="center"
android:visibility="gone"
android:maxHeight="110dp"
android:maxWidth="110dp"
android:adjustViewBounds="true"/>
</FrameLayout>
<LinearLayout
android:id="@+id/layoutMarketDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textViewTitle"
android:textStyle="bold"
android:textSize="20sp"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/separationLineSize"
android:layout_gravity="center_vertical"
android:layout_margin="10dp"
android:background="@color/separationColor" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/market_capitalization"
android:textStyle="bold"/>
<TextView
android:id="@+id/textViewMarketCap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/layoutPercentageDominance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
android:layout_marginTop="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dominance_percentage"
android:textStyle="bold"/>
<TextView
android:id="@+id/textViewDominancePercentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="@+id/layoutActiveCrypto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/active_cryptocurrencies"
android:textStyle="bold"/>
<TextView
android:id="@+id/textViewActiveCrypto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/volume_24h"
android:textStyle="bold"/>
<TextView
android:id="@+id/textViewVolume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/layoutActiveMarkets"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/active_marketes"
android:textStyle="bold"/>
<TextView
android:id="@+id/textViewActiveMarkets"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.constraint.ConstraintLayout>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/gradient_background"
app:layout_collapseMode="pin">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="pin"
android:layout_margin="10dp">
<ImageButton
android:id="@+id/drawer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp"
android:visibility="visible"
android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/title_coin_list"
android:textSize="18sp"
android:textColor="@color/white"
android:textStyle="bold"/>
</FrameLayout>
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?attr/actionBarSize"
android:background="@drawable/gradient_background"
android:elevation="0dp">
<ListView android:id="@+id/linearLayoutOverview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:divider="@null"
android:dividerHeight="0dp"
android:clipChildren="false"
android:background="@drawable/list_background"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/record_transaction_layout_background_sell">
<TextView
android:text="sell fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"/>
</RelativeLayout>

View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.herbron.moodl.Activities.HomeActivity"
android:background="@drawable/gradient_background">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:theme="@style/AppTheme.AppBarOverlay"
android:background="@drawable/gradient_background"
app:elevation="0dp">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:toolbarId="@+id/toolbar"
app:collapsedTitleGravity="center"
app:expandedTitleGravity="center"
app:titleEnabled="true"
app:elevation="0dp">
<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:layout_marginRight="-30dp">
</android.support.v7.widget.Toolbar>
<TextView
android:id="@+id/toolbarSubtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:layout_marginBottom="20dp"
android:gravity="center"
android:textSize="20sp"
app:layout_collapseMode="parallax"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="pin"
android:layout_margin="10dp">
<ImageButton
android:id="@+id/drawer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp"
android:visibility="visible"
android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/>
</FrameLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swiperefreshsummary"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedScrollViewLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/list_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:clipChildren="false">
<LinearLayout
android:id="@+id/currencyListLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<Button
android:id="@+id/buttonAddTransaction"
android:text="@string/add_transaction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_dashed_background"
android:layout_margin="10dp"
android:textColor="@color/separationColor"
style="@style/Widget.AppCompat.Button.Borderless"/>
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.design.widget.CoordinatorLayout>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/transactionsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:text="@string/transaction_history"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="@dimen/cardview_elevation"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5">
<ListView
android:id="@+id/listTransactions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:divider="@null"
android:dividerHeight="0dp"/>
</LinearLayout>
<TextView
android:text="@string/trade_history"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="@dimen/cardview_elevation" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<LinearLayout
android:id="@+id/tradeLoaderIndicator"
android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center"
android:layout_margin="10dp">
<ProgressBar
android:id="@+id/loadingIndicator"
android:layout_width="20dp"
android:layout_height="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/trade_loading"/>
</LinearLayout>
<ListView
android:id="@+id/listTrades"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:divider="@null"
android:dividerHeight="0dp"/>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/record_transaction_layout_background_transfer">
<TextView
android:text="transfer fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"/>
</RelativeLayout>

View File

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/gradient_background"
app:layout_collapseMode="pin"
app:elevation="0dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="pin"
android:layout_margin="10dp">
<ImageButton
android:id="@+id/drawer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp"
android:visibility="visible"
android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/title_watchlist"
android:textSize="18sp"
android:textColor="@color/white"
android:textStyle="bold"/>
<ImageButton
android:id="@+id/edit_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_edit_mode"
android:background="@drawable/ic_mode_edit_white_24dp"
android:visibility="visible"
android:layout_gravity="end|center_vertical"
android:contentDescription="@string/edit_mode"/>
</FrameLayout>
</android.support.v7.widget.Toolbar>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swiperefreshwatchlist"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:background="@drawable/gradient_background">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:background="@drawable/list_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:clipChildren="false">
<com.jmedeisis.draglinearlayout.DragLinearLayout android:id="@+id/linearLayoutWatchlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
<ProgressBar
android:id="@+id/progressBarWatchlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleLarge"
android:layout_gravity="center"
android:background="@drawable/circular_progress_bar"
android:visibility="visible"/>
<Button
android:id="@+id/buttonAddWatchlist"
android:text="@string/add_watchlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_dashed_background"
android:layout_margin="10dp"
android:textColor="@color/separationColor"
style="@style/Widget.AppCompat.Button.Borderless"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.constraint.ConstraintLayout>

View File

@ -23,7 +23,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_settings" android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp" app:srcCompat="@drawable/ic_drawer_white_24dp"
android:background="@color/transparent"
android:visibility="visible" android:visibility="visible"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/> android:contentDescription="@string/drawer"/>

View File

@ -22,7 +22,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_settings" android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp" app:srcCompat="@drawable/ic_drawer_white_24dp"
android:background="@color/transparent"
android:visibility="visible" android:visibility="visible"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/> android:contentDescription="@string/drawer"/>

View File

@ -59,7 +59,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_settings" android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp" app:srcCompat="@drawable/ic_drawer_white_24dp"
android:background="@color/transparent"
android:visibility="visible" android:visibility="visible"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/> android:contentDescription="@string/drawer"/>

View File

@ -23,7 +23,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_settings" android:text="@string/action_settings"
android:background="@drawable/ic_drawer_white_24dp" app:srcCompat="@drawable/ic_drawer_white_24dp"
android:background="@color/transparent"
android:visibility="visible" android:visibility="visible"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:contentDescription="@string/drawer"/> android:contentDescription="@string/drawer"/>
@ -43,7 +44,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_edit_mode" android:text="@string/action_edit_mode"
android:background="@drawable/ic_mode_edit_white_24dp" app:srcCompat="@drawable/ic_mode_edit_white_24dp"
android:background="@color/transparent"
android:visibility="visible" android:visibility="visible"
android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical"
android:contentDescription="@string/edit_mode"/> android:contentDescription="@string/edit_mode"/>