mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-18 02:51:38 +01:00
Correction des dimensions des toolbar pour faire apparaître le bouton back
This commit is contained in:
parent
003f577288
commit
bbbae5639d
5 changed files with 13 additions and 7 deletions
|
@ -23,7 +23,11 @@ public class MedicamentDetailActivity extends AppCompatActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_medicament_detail);
|
setContentView(R.layout.activity_medicament_detail);
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.detail_toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.detail_toolbar);
|
||||||
|
|
||||||
|
if (toolbar != null) {
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
toolbar.setTitle(getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.app.Activity;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
import android.support.design.widget.CollapsingToolbarLayout;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -64,8 +64,11 @@ public class MedicamentListActivity extends AppCompatActivity {
|
||||||
dbHelper = new DBHelper(this);
|
dbHelper = new DBHelper(this);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
|
||||||
|
if (toolbar != null) {
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
toolbar.setTitle(getTitle());
|
toolbar.setTitle(getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -17,10 +17,8 @@
|
||||||
<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="100dp"
|
android:layout_height="25dp"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
android:title="Prout"
|
|
||||||
android:titleTextColor="@android:color/black"
|
|
||||||
app:contentScrim="?attr/colorPrimary"
|
app:contentScrim="?attr/colorPrimary"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
app:toolbarId="@+id/toolbar"/>
|
app:toolbarId="@+id/toolbar"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="app_bar_height">100dp</dimen>
|
<dimen name="app_bar_height">75dp</dimen>
|
||||||
<dimen name="item_width">200dp</dimen>
|
<dimen name="item_width">200dp</dimen>
|
||||||
<dimen name="text_margin">16dp</dimen>
|
<dimen name="text_margin">16dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue