import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.Spinner;
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- final ActionBar actionBar = this.getSupportActionBar();
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
- actionBar.setDisplayHomeAsUpEnabled(true);
- actionBar.setDisplayShowHomeEnabled(true);
- actionBar.setIcon(R.drawable.ic_launcher);
-
// Find the widget id from the intent.
final Intent intent = getIntent();
final Bundle extras = intent.getExtras();
// Set the view layout resource to use.
this.setContentView(R.layout.appwidget_configure);
+ final Toolbar toolbar = (Toolbar) findViewById(R.id.weather_main_toolbar);
+ this.setSupportActionBar(toolbar);
+
/******************* Show/hide country field *******************/
String keyPreference = this.getApplicationContext().getString(
R.string.widget_preferences_country_switch_key);
android:layout_width="fill_parent"
android:layout_height="fill_parent">
+ <include layout="@layout/weather_general_toolbar"/>
+
<LinearLayout android:id="@+id/weather_appwidget_configure_button_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:layout_above="@id/weather_appwidget_configure_button_layout">
+ android:layout_above="@id/weather_appwidget_configure_button_layout"
+ android:layout_below="@+id/weather_main_toolbar">
<LinearLayout
android:layout_width="fill_parent"