Compare commits
No commits in common. "6ff8e099eb718ec93ecd7116c1ce2689ac202170" and "9aaf27e309a2138c8ef7fb7470fbff5cd2915f53" have entirely different histories.
6ff8e099eb
...
9aaf27e309
@ -9,11 +9,7 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.MyWeather">
|
android:theme="@style/Theme.MyWeather">
|
||||||
<!-- Adding an attribute to remove the app bar only in the activity that allows the user to add a city-->
|
<activity android:name=".AddCity"></activity>
|
||||||
<activity android:name=".AddCity"
|
|
||||||
android:parentActivityName=".MainActivity"
|
|
||||||
android:theme="@style/Theme.MyWeather.NoActionBar">
|
|
||||||
</activity>
|
|
||||||
<activity android:name=".MainActivity">
|
<activity android:name=".MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|||||||
@ -1,20 +1,14 @@
|
|||||||
package fr.romanet.vj.apps.myweather;
|
package fr.romanet.vj.apps.myweather;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
public class AddCity extends AppCompatActivity {
|
public class AddCity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
{
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.add_city_page);
|
setContentView(R.layout.add_city_page);
|
||||||
Toolbar toolbarAddCity = (Toolbar) findViewById(R.id.toolbarAddCity);
|
|
||||||
setSupportActionBar(toolbarAddCity);
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13,20 +13,18 @@
|
|||||||
android:theme="@style/Theme.MyWeather.AppBarOverlay">
|
android:theme="@style/Theme.MyWeather.AppBarOverlay">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbarAddCity"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="75dp"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:title="Add a city"
|
app:title="Add a city"
|
||||||
android:minHeight="60dp"
|
|
||||||
app:popupTheme="@style/Theme.MyWeather.PopupOverlay" />
|
app:popupTheme="@style/Theme.MyWeather.PopupOverlay" />
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp" />
|
android:layout_height="130dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
@ -42,7 +40,7 @@
|
|||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp" />
|
android:layout_height="120dp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/editText"
|
android:id="@+id/editText"
|
||||||
@ -55,7 +53,7 @@
|
|||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="90dp" />
|
android:layout_height="100dp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnSave"
|
android:id="@+id/btnSave"
|
||||||
|
|||||||
@ -1,17 +1,14 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.MyWeather" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.MyWeather" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
|
|
||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/red</item>
|
<item name="colorPrimary">@color/red</item>
|
||||||
<item name="colorPrimaryVariant">@color/red</item>
|
<item name="colorPrimaryVariant">@color/red</item>
|
||||||
<item name="colorOnPrimary">@color/white</item>
|
<item name="colorOnPrimary">@color/white</item>
|
||||||
|
|
||||||
<!-- Secondary brand color. -->
|
<!-- Secondary brand color. -->
|
||||||
<item name="colorSecondary">@color/red</item>
|
<item name="colorSecondary">@color/red</item>
|
||||||
<item name="colorSecondaryVariant">@color/red</item>
|
<item name="colorSecondaryVariant">@color/red</item>
|
||||||
<item name="colorOnSecondary">@color/white</item>
|
<item name="colorOnSecondary">@color/white</item>
|
||||||
|
|
||||||
<!-- Status bar color. -->
|
<!-- Status bar color. -->
|
||||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user