One ListView ,include a imageView and two textview . usually give the listview set a Adapter ,which is inherit BaseAdapter . you can get you need in getView() method.
for example class ListItemAdapter extends BaseAdapter { public int getCount() { return defualt_account.length; } public Object getItem(int position) { return position ; } public long getItemId(int position) { return position; } public View getView(int position, View contentView, ViewGroup parent) { TextView textView = new TextView(EditcodeviewActivity.this); textView.setText(defualt_account[position]); // 设置字体大小 textView.setTextSize(24); AbsListView.LayoutParams layoutParams = new AbsListView.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); textView.setBackgroundColor(Color.argb(200, 33, 33, 33)); textView.setLayoutParams(layoutParams); // 设置水平方向上居中 textView.setGravity(android.view.Gravity.CENTER_VERTICAL); textView.setMinHeight(45); // 设置文字颜色 textView.setTextColor(Color.WHITE); // 设置图标在文字的左边 textView.setCompoundDrawablesWithIntrinsicBounds( default_account_icons[position], 0, 0, 0); // 设置textView的左上右下的padding大小 textView.setPadding(15, 0, 15, 0); // 设置文字和图标之间的padding大小 textView.setCompoundDrawablePadding(15); return textView; } } 在 2012年3月7日 下午2:07,megha agrawal <megha14.2...@gmail.com>写道: > Hello All, > > I want to create a UI for my app as shown in image attached with this > mail. I am not getting what type of widget they have used?? > > Can somebody explain, how to go for this type of design? > > Thanks in Advance!! > > -- > 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 -- 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