<>
</>
</>
//我加了个activity为第一个页面,点击开始跳到主页面
package
com.example.administrator.wuziqi;
import
android.app.Activity;
import
android.os.Bundle;
import
android.view.Menu;
import
android.view.MenuItem;
/**
* Created by Administrator on 2016/11/25.
*/
public class
main2
extends
Activity{
private
WuziqiPanel
wuziqiPanel
;
@Override
protected void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
setContentView(R.layout.
activity_main
);
wuziqiPanel
= (WuziqiPanel) findViewById(R.id.
id_wuziqi
);//id_wuziqi是自定义组件view的id }
@Override
public boolean
onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.
menu_main
,menu);
return true
;
}
@Override
public boolean
onOptionsItemSelected(MenuItem item) {
int
id=item.getItemId();
if
(id==R.id.
action_settings
)
{
wuziqiPanel
.start();
return true
;
}
return super
.onOptionsItemSelected(item);
}
}
目前暂无任何回答
- 0 回答
- 0 关注
- 1341 浏览
添加回答
举报
0/150
提交
取消