Код: Выделить всё
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
</menu>
Код: Выделить всё
Button action_settings;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
action_settings = (Button) findViewById(R.id.action_settings);
action_settings.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.action_settings:
Intent intent = new Intent(this, ????????.class);
startActivity(intent);
break;
default:
break;
}
}
Подскажите пожалуйста.