0

I am developing an app which needs an action bar at the bottom instead of the default top (not a split action bar).

My application runs in landscape mode, and it's used in car, and i need an action bar at the bottom because it's easier to use.

Is it possible to move the action bar to the bottom?

DoubleP90
  • 1,249
  • 1
  • 16
  • 29

3 Answers3

0

Its not possible to have action bar on Button. Try to implement your custom Views. If your application is used in car try to use the Dashboard design Pattern. Possible duplication of: Android - Change position of android action bar.

Community
  • 1
  • 1
Anis BEN NSIR
  • 2,555
  • 20
  • 29
0

Is it possible to move the action bar to the bottom?

No, sorry. You will have to get rid of the default action bar (e.g., use Theme.NoActionBar) and create your own "car bar" that your activity uses on the bottom.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

Yes. It is not possible in this scenario. Instead of this make layout like footer and menu items use pop window.

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tabhost);
    init();
    popupInit();

}

@Override
public void onClick(View v) {
    // TODO Auto-generated method stub

     //Creating the instance of PopupMenu  
    PopupMenu popup = new PopupMenu(TestingActivity.this,v);  
    //Inflating the Popup using xml file  
    popup.getMenuInflater().inflate(R.menu.main, popup.getMenu());  

    //registering popup with OnMenuItemClickListener  
    popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {  
     public boolean onMenuItemClick(MenuItem item) {  
          Toast.makeText(TestingActivity.this,"You Clicked : ",Toast.LENGTH_SHORT).show();
      return true;  
     }  
    });  

    popup.show();//showing popup menu


}

public void init() { 
    popupButton = (Button) findViewById(R.id.popupbutton);  
    insidePopupButton = new Button(this); 
    secondPopupButton = new Button(this);
    layoutOfPopup = new LinearLayout(this); 
    insidePopupButton.setText("OK");
    secondPopupButton.setText("OK");
    //layoutOfPopup.setOrientation(1);  
    layoutOfPopup.addView(insidePopupButton); 
    layoutOfPopup.addView(secondPopupButton); 
} 

public void popupInit() { 
    popupButton.setOnClickListener(this); 
    insidePopupButton.setOnClickListener(this); 
    popupMessage = new PopupWindow(layoutOfPopup, LayoutParams.WRAP_CONTENT,
    LayoutParams.WRAP_CONTENT); 
    popupMessage.setContentView(layoutOfPopup); 
}
Narendran
  • 715
  • 7
  • 8