2016-05-13 13 views

Antwort

0

Ich möchte dieses Layout in ActionBar

aufblasen Ihr Layout und fügen Sie es als benutzerdefinierte vie auf der Aktionsleiste

ActionBar.LayoutParams lp = new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.MATCH_PARENT); 
View customView = LayoutInflater.from(this).inflate(R.layout.my_layout, null); 
getSupportActionBar().setCustomView(customNav, lp); // or getActionBar() 

Auch Symbole Ich möchte added zu werden hinzufügen in der Taste Verwendung

android:drawableLeft="@drawable/icon" 

oder

android:drawableRight="@drawable/icon" 

hinzufügen Symbole auf Taste

+0

In LayoutParams zeigt es mehrere Auswahlmöglichkeiten, Alt + Eingabe, welche sollte ich aus der Liste verwenden. – Jason

+0

Für 'LayoutParams'? Bitte überprüfe meine aktualisierte Antwort. – Rohit5k2

+0

Ja, alle LayoutParams sind rot und müssen mehrere LayoutParams auswählen, wie widget.radiogroup.LayoutParams. – Jason