Android自定义PopupWindow实现的Menu(TabMenu)(9)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-17 14:38 点击:次
* <p>
* Title: MainMenuView.java
* </p>
* <p>
* E-Mail: 176291935@qq.com
* </p>
* <p>
* QQ: 176291935
* </p>
* <p>
* Http: iaiai.iteye.com
* </p>
* <p>
* Create time: 2011-8-17
* </p>
*
* @author 丸子
* @version 0.0.1
*/
public class MainMenuView extends Activity {
TabMenu.MenuBodyAdapter[] bodyAdapter = new TabMenu.MenuBodyAdapter[3];
TabMenu.MenuTitleAdapter titleAdapter;
TabMenu tabMenu;
int selTitle = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// 设置分页栏的标题
titleAdapter = new TabMenu.MenuTitleAdapter(this, new String[] { "常用",
"设置", "工具" }, 16, 0xFF222222, Color.LTGRAY, Color.WHITE);
// 定义每项分页栏的内容
bodyAdapter[0] = new TabMenu.MenuBodyAdapter(this, new String[] {
"常用1", "常用2", }, new int[] { R.drawable.menu_test,
R.drawable.menu_bookmark }, 13, 0xFFFFFFFF);
bodyAdapter[1] = new TabMenu.MenuBodyAdapter(this, new String[] {
"设置1", "设置2", "设置3" }, new int[] { R.drawable.menu_edit,
R.drawable.menu_delete, R.drawable.menu_fullscreen }, 13,
0xFFFFFFFF);
bodyAdapter[2] = new TabMenu.MenuBodyAdapter(this, new String[] {
"工具1", "工具2", "工具3", "工具4" }, new int[] { R.drawable.menu_copy,
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>