When I write the following code in the onCreate
method :
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Get a support ActionBar corresponding to this toolbar
ActionBar ab = getSupportActionBar();
// Enable the Up button
ab.setDisplayHomeAsUpEnabled(true);
ab.setTitle("Vodafone-Dongles");
}
}
I get:
Otherwise it is OK and shows the default title of the action bar.
Why am I getting it?