@Override
protected void onCreate(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);
+
setContentView(R.layout.weather_about);
}
@Override
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);
+
setContentView(R.layout.weather_licenses);
mWebView = (WebView) this.findViewById(R.id.weather_licenses);
tabLayout.setupWithViewPager(mPager);
final ActionBar actionBar = this.getSupportActionBar();
-
- PreferenceManager.setDefaultValues(this, R.xml.weather_preferences, false);
-
- // Specify that tabs should be displayed in the action bar.
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setDisplayShowHomeEnabled(true);
+ actionBar.setIcon(R.drawable.ic_launcher);
+
+ PreferenceManager.setDefaultValues(this, R.xml.weather_preferences, false);
}
@Override
@Override
protected 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);
+
this.setContentView(R.layout.weather_map);
// Acquire a reference to the system Location Manager
protected 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);
+
this.getFragmentManager()
.beginTransaction()
.replace(android.R.id.content,
this.setContentView(R.layout.weather_specific);
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);
}
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.v4.app.Fragment;
+import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
+ final AppCompatActivity appCompatActivity = (AppCompatActivity)this.getActivity();
+ final ActionBar actionBar = appCompatActivity.getSupportActionBar();
+ actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setDisplayShowHomeEnabled(true);
+ actionBar.setIcon(R.drawable.ic_launcher);
final Bundle extras = this.getActivity().getIntent().getExtras();
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();