Transparent status bar
This commit is contained in:
parent
edbb27dd37
commit
a082bb3d99
@ -1,6 +1,7 @@
|
|||||||
package com.nauk.moodl.Activities;
|
package com.nauk.moodl.Activities;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
@ -9,6 +10,8 @@ import android.support.v4.view.ViewPager;
|
|||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import com.nauk.moodl.PagerAdapter;
|
import com.nauk.moodl.PagerAdapter;
|
||||||
import com.nauk.moodl.R;
|
import com.nauk.moodl.R;
|
||||||
@ -54,6 +57,9 @@ public class HomeActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
/**Interface setup**/
|
/**Interface setup**/
|
||||||
|
Window w = getWindow();
|
||||||
|
w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||||
|
w.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
|
||||||
|
|
||||||
//Setup main interface
|
//Setup main interface
|
||||||
//requestWindowFeature(Window.FEATURE_NO_TITLE);
|
//requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.nauk.moodl.DataManagers.CurrencyData;
|
package com.nauk.moodl.DataManagers.CurrencyData;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.volley.Request;
|
import com.android.volley.Request;
|
||||||
import com.android.volley.RequestQueue;
|
import com.android.volley.RequestQueue;
|
||||||
import com.android.volley.Response;
|
import com.android.volley.Response;
|
||||||
@ -60,7 +62,15 @@ public class CurrencyTickerList {
|
|||||||
JSONObject jsonObject = new JSONObject(coinTickersHashmap.get(symbol));
|
JSONObject jsonObject = new JSONObject(coinTickersHashmap.get(symbol));
|
||||||
tickerId = jsonObject.getString("id");
|
tickerId = jsonObject.getString("id");
|
||||||
} catch (JSONException | NullPointerException e) {
|
} catch (JSONException | NullPointerException e) {
|
||||||
|
switch (e.getMessage())
|
||||||
|
{
|
||||||
|
case "Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference":
|
||||||
|
Log.d("moodl", "Symbol " + symbol + " not supported");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tickerId;
|
return tickerId;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="36dp"
|
||||||
android:height="24dp"
|
android:height="36dp"
|
||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="com.nauk.moodl.Activities.HomeActivity"
|
android:fitsSystemWindows="true"
|
||||||
android:fitsSystemWindows="true">
|
tools:context="com.nauk.moodl.Activities.HomeActivity">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/masterLayout"
|
android:id="@+id/masterLayout"
|
||||||
|
@ -3,18 +3,20 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_marginBottom="56dp">
|
android:layout_marginBottom="56dp">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay"
|
||||||
android:background="@drawable/gradient_background_reverse">
|
android:background="@drawable/gradient_background_reverse">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:title="Test"
|
|
||||||
app:layout_collapseMode="pin">
|
app:layout_collapseMode="pin">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
@ -12,16 +12,14 @@
|
|||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/app_bar_height"
|
android:layout_height="@dimen/app_bar_height"
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
android:theme="@style/AppTheme.AppBarOverlay"
|
android:theme="@style/AppTheme.AppBarOverlay"
|
||||||
|
android:paddingTop="10dp"
|
||||||
android:background="@drawable/gradient_background">
|
android:background="@drawable/gradient_background">
|
||||||
|
|
||||||
<android.support.design.widget.CollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
android:id="@+id/toolbar_layout"
|
android:id="@+id/toolbar_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
app:contentScrim="@drawable/gradient_background"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
app:toolbarId="@+id/toolbar"
|
app:toolbarId="@+id/toolbar"
|
||||||
app:collapsedTitleGravity="center"
|
app:collapsedTitleGravity="center"
|
||||||
@ -33,7 +31,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center|bottom"
|
android:layout_gravity="center|bottom"
|
||||||
android:layout_marginBottom="35dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_collapseMode="parallax"/>
|
app:layout_collapseMode="parallax"/>
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:layout_marginBottom="56dp">
|
android:layout_marginBottom="56dp">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="10dp"
|
||||||
android:background="@drawable/gradient_background_reverse">
|
android:background="@drawable/gradient_background_reverse">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
@ -75,7 +77,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="10dp">
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<dimen name="cardViewSecondaryText">12sp</dimen>
|
<dimen name="cardViewSecondaryText">12sp</dimen>
|
||||||
<dimen name="cardViewChartSize">150dp</dimen>
|
<dimen name="cardViewChartSize">150dp</dimen>
|
||||||
|
|
||||||
<dimen name="app_bar_height">180dp</dimen>
|
<dimen name="app_bar_height">150dp</dimen>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="text_margin">16dp</dimen>
|
<dimen name="text_margin">16dp</dimen>
|
||||||
<dimen name="mainText">6dp</dimen>
|
<dimen name="mainText">6dp</dimen>
|
||||||
|
Loading…
Reference in New Issue
Block a user