我的位置: 首页 >> App >> App知识

Android “四分之一”屏实现

095    private void openRightWindow(String Id, int which){

096        if (which != currentPage) {

097            currentPage = which;

098            Intent intent = new Intent();

099            switch (which) {

100            case 1:

101                intent.setClass(this, SecondActivity.class);

102                break;

103

104            case 2:

105                intent.setClass(this, ThirdActivity.class);

106                break;

107            }

108            View view = null;

109            Window window = getLocalActivityManager().startActivity(Id, intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));

110            if (window != null)

111            {

112                view = window.getDecorView();

113            }

114            mContentView.removeAllViews();

115            mContentView.addView(view, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));

116        }

117         

翻页: 1 2 3 4 5 6 7

App知识

客户中心

版权2005-2020    聚卓网络有限公司    电话:18589057325    QQ:2338754269   粤ICP备14021702号

地址:深圳市宝安区 37区龙井一路100号 新乐社区工作站办公大楼侧门6楼(近翻身路、新乐社区健康服务中心)

技术支持: 网站建设