you want to dispaly this menu bar at the bottom of the  screen right
you have many ways to do this you  can create and paste it like an
image on the bottom of the screen
 or you can put tabhost .


or next way is little complex but it is the way i do it

public class BottomMenu extends LinearLayout {
        Intent backIntent;
        public GridView view;
        private LayoutInflater inflater;
        Context context;
        ViewHolder holder;

        public BottomMenu(Context context, AttributeSet attrs) {
                super(context, attrs);
                this.context = context;
                inflater = (LayoutInflater) context
                                
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                view = (GridView)inflater.inflate(R.layout.bottommenugrid, 
null);
                init();
        }

        public BottomMenu(Context context) {
                super(context);
                this.context = context;
                inflater = (LayoutInflater) context
                                
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                view = (GridView)inflater.inflate(R.layout.bottommenugrid, 
null);
                init();
        }

        public void init() {
                view.setVerticalScrollBarEnabled(false);
                view.setHorizontalScrollBarEnabled(false);
                removeAllViews();
                holder = new ViewHolder();
                view.setTag(holder);
                addView(view);
                view.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
                        54));
                view.setOnItemClickListener(new OnItemClickListener() {

                                public void onItemClick(AdapterView<?> parent, 
View view,
                                                final int pos, long id) {
                                        handleClick(pos);
                                }
                });
                view.setAdapter(new BottomMenuGridAdaptor(this.context));
        }

        class ViewHolder
        {

        }

        public void handleClick(int pos)
        {
                Common.selectedTabID=pos;
                switch (pos)
                   {
                           case 0:
                           {
                                   Intent intent=new 
Intent(context,EnquiriesActivity.class);
                                   context.startActivity(intent);
                                   break;
                           }

                           case 1:
                           {
                                   Intent intent=new 
Intent(context,AccountOpeningActivity.class);
                                   context.startActivity(intent);
                                   break;
                           }

                           case 2:
                           {
                                   Intent intent=new 
Intent(context,TransfersActivity.class);
                                   context.startActivity(intent);
                                   break;
                           }

                           case 3:
                           {
                                   Intent intent=new 
Intent(context,PaymentsActivity.class);
                                   context.startActivity(intent);
                                   break;
                           }
                   }
        }

}


On May 9, 2:40 pm, MOHIT SHARMA <mohit7...@gmail.com> wrote:
> Hi ,
>
> I want to create menu like this(shown in fig ) . I want to display my menu
>  without pressing Menu key .
> [image: 1.png]
>
> Also do tell what this bar is called in Android (API level 8/10) Any kind of
> help would be appreciated .
>
>  1.png
> 11KViewDownload

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to