Warum ich Symbolleiste erstellen Ich habe nicht drei Punkte, die angezeigt werden. Wie kann ich ?Android-Symbolleiste: Warum drei Punkte nicht angezeigt werden?
public class Main extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
}
}
und XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="woowin.woowin.Main">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#393939"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
/>
</RelativeLayout>
Und können Sie mir erklären, wie in diesen drei Punkten nach, dass Optionen hinzufügen?
danke
Dies ist Optionsmenü und Sie können Element hinzufügen, indem Sie in. XML-Datei bearbeiten. das ist in 'res -> menu -> activity_main' standardmäßig –