日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > Android >内容正文

Android

Android双屏异显的实现

發(fā)布時(shí)間:2025/3/15 Android 55 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Android双屏异显的实现 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

概述

Android實(shí)現(xiàn)雙屏異顯的實(shí)現(xiàn)方式有2種。

方式一:在Android4.2及以上平臺(tái)上,按照標(biāo)準(zhǔn)Android SDK提供的API,使用Presentation類(lèi),將一個(gè)APP的相關(guān)內(nèi)容顯示到指定的屏幕上,具體請(qǐng)參考https://developer.android.com/reference/android/app/Presentation.html。這種方式實(shí)現(xiàn)的是應(yīng)用內(nèi)的異顯,也是View級(jí)別的異顯。

方式二:通過(guò)修改Framework層的am,wm,display相關(guān)代碼,從而在不同的顯示設(shè)備上運(yùn)行不同的應(yīng)用,這種多任務(wù)的雙屏異顯方法實(shí)現(xiàn)了不同應(yīng)用之間的異顯,本文重點(diǎn)講解這種雙屏異顯方法的實(shí)現(xiàn)方式。這種實(shí)現(xiàn)方式是基于某芯片廠(chǎng)商系列芯片,Android 6.0平臺(tái)開(kāi)發(fā)的。

這需要解決如下幾個(gè)問(wèn)題:

1.如何獲取所有的TaskID?

在IActivityManager.java添加接口,public List<Integer> getAllTaskIds() throws RemoteException。

ActivityManagerNative.java種實(shí)現(xiàn)了IActivityManger接口,具體實(shí)現(xiàn)如下:

?? ?@Override
?? ?public List<Integer> getAllTaskIds() throws RemoteException{
? ? ? ? ? ? List<Integer> taskIds = new ArrayList<Integer>();
?? ? ? ?List<StackInfo> stackInfos = getAllStackInfos();
?? ? ? ?if(stackInfos != null && stackInfos.size() > 0){
?? ? ? ? ? ?for(StackInfo info : stackInfos){
?? ??? ? ? ?int[] taskIdArray = info.taskIds;
?? ??? ? ? ?reverseArray(taskIdArray);
?? ??? ? ? ?if(taskIdArray != null && taskIdArray.length > 0){
?? ??? ? ? ? ? for(int taskId : taskIdArray)
?? ??? ??? ? ? ?taskIds.add(taskId);
?? ??? ? ? ?}
?? ? ? ? ? ?}
?? ? ? ?}
?? ? ? ?return taskIds;
?? ?}

2.如何確保兩個(gè)應(yīng)用同時(shí)運(yùn)行,同時(shí)保持Resume狀態(tài)?如何確保副屏Activity不會(huì)隨著主屏應(yīng)用同時(shí)銷(xiāo)毀?在ActivityStack.java下activityPausedLocked方法添加如下代碼:
? ? if(r.task != null && r.task.taskId == mService.getSecondDisplayTaskId())
? ? ? ? return;
上述代碼禁止副屏應(yīng)用進(jìn)入Pased狀態(tài),副屏應(yīng)用將一直保持Resume狀態(tài)


3.主屏與副屏的應(yīng)用如何切換,同顯與異顯如何切換?這是通過(guò)操作主屏與副屏的窗口實(shí)現(xiàn)的,WindowManagerService.java添加如下代碼:

?? ?public void setOnlyShowInExtendDisplay(Session session,IWindow client,int transit){
?? ??? ?
?? ??? ?long origId = Binder.clearCallingIdentity();
?? ??? ?synchronized(mWindowMap){
?? ??? ??? ?if(mDisplayContents == null || mDisplayContents.size() <= 1){
?? ??? ??? ?return;
?? ??? ?}
?? ??? ?final int displayCount = mDisplayContents.size();
?? ??? ?DisplayContent defaultContent = getDefaultDisplayContentLocked();
?? ??? ?int displayId = 0;
?? ??? ?DisplayContent secondDisplayContent = null;
?? ??? ?for(int i = 0; i < displayCount;i++){
?? ??? ??? ?final DisplayContent content = mDisplayContents.valueAt(i);
?? ??? ??? ?if(content != defaultContent){
?? ??? ??? ??? ?secondDisplayContent = content;
?? ??? ??? ??? ?displayId = secondDisplayContent.getDisplayId();
?? ??? ??? ??? ?break;
?? ??? ??? ?}
?? ??? ?}
?? ??? ?if(secondDisplayContent == null){
?? ??? ??? ?return;
?? ??? ?}
?? ??? ?if(!okToDisplay()){
?? ??? ??? ?return;
?? ??? ?}
?? ??? ?WindowState current = windowForClientLocked(session, client, false);?
?? ??? ?if(isHomeWindow(current)){
?? ??? ??? ?return;
?? ??? ?}
?? ??? ?AppWindowToken wtoken = current.mAppToken;
?? ??? ?if(wtoken == null){
?? ??? ??? ?return;
?? ??? ?}
?
?? ??? ?
? ? ? ? ?? ?
?? ??? ?int groupId = wtoken.mTask.mTaskId;
?? ??? ?mH.sendMessage(mH.obtainMessage(H.DO_TASK_DISPLAY_CHANGED, groupId, -1));
?? ? ? ?}
?? ??? ?Binder.restoreCallingIdentity(origId);
?? ?}
?? ?
?
?? ?/**
?? ?move window to second display
?? ?*/
??? ?public void moveTransitionToSecondDisplay(int groupId,int transit){
?? ??? ?//if(!isShowDualScreen()){
?? ??? ?//?? ?mSecondTaskIds.clear();
?? ??? ?//}
?? ??? ?//Settings.System.putInt(mContext.getContentResolver(), Settings.DUAL_SCREEN_ICON_USED, 0);
?? ??? ?List<Integer> allTaskIds = null;
?? ??? ?try{
?? ??? ??? ?allTaskIds = mActivityManager.getAllTaskIds();
?? ??? ?}catch (Exception e){
?? ??? ??? ?Log.i("DualScreen", "WindowManagerService->getAllTaskIds->e:" + e);
?? ??? ?}
?? ??? ?
?? ??? ?if(allTaskIds == null || allTaskIds.size() < 2)
?? ??? ??? ?return;
?? ??? ?
?? ??? ?if(isShowDualScreen()){
?? ??? ??? ?moveWindowToSecondDisplayWithDualShow();
?? ??? ??? ?return;
?? ??? ?}
?? ??? ?
?? ??? ?
?? ??? ?long origId = Binder.clearCallingIdentity();
?? ??? ?int curMoveTaskId = -1;
?? ??? ?synchronized(mWindowMap){
?? ??? ??? ?if(mDisplayContents == null || mDisplayContents.size() <= 1){
?? ??? ??? ??? ?return;
?? ??? ??? ?}
?? ??? ??? ?final int displayCount = mDisplayContents.size();
?? ??? ??? ?DisplayContent defaultContent = getDefaultDisplayContentLocked();
?? ??? ??? ?int displayId = 0;
?? ??? ??? ?DisplayContent secondDisplayContent = null;
?? ??? ??? ?for(int i = 0; i < displayCount;i++){
?? ??? ??? ??? ?final DisplayContent content = mDisplayContents.valueAt(i);
?? ??? ??? ??? ?if(content != defaultContent){
?? ??? ??? ??? ??? ?secondDisplayContent = content;
?? ??? ??? ??? ??? ?displayId = secondDisplayContent.getDisplayId();
?? ??? ??? ??? ??? ?
?? ??? ??? ??? ??? ?break;
?? ??? ??? ??? ?}
?? ??? ??? ?}
?
?? ??? ??? ?if(secondDisplayContent == null){
?? ??? ??? ??? ?return;
?? ??? ??? ?}
?? ??? ??? ?if(!okToDisplay()){
?? ??? ??? ??? ?return;
?? ??? ??? ?}
?? ??? ??? ?SurfaceControl.openTransaction();
?? ??? ??? ?WindowState win = null;
?? ??? ??? ?WindowList defaultWindows = defaultContent.getWindowList();
?? ??? ??? ?
?? ??? ??? ?try{
?? ??? ??? ??? ?WindowList secondDisplayAddList = new WindowList();
?? ??? ??? ??? ?WindowList secondDisplayWindows = secondDisplayContent.getWindowList();
?? ??? ??? ??? ?
?? ??? ??? ??? ?int topTaskId = -1;
?? ??? ??? ??? ?if(allTaskIds != null && allTaskIds.size() > 0){
?? ??? ??? ??? ??? ?topTaskId = allTaskIds.get(0);
?? ??? ??? ??? ??? ?//mSecondTaskIds.add(topTaskId);
?? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ?for(int i= defaultWindows.size()-1;i>=0;i--){
?? ??? ??? ??? ??? ?win = defaultWindows.get(i);
?? ??? ??? ??? ??? ?if(win == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?if (win.mAppToken == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ??? ?if(win.mAppToken.mTask == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?int windowTaskId = win.mAppToken.mTask.mTaskId;
?? ??? ??? ??? ??? ?if(windowTaskId == topTaskId){
?? ??? ??? ??? ??? ??? ?win.setPrimaryDisplay(true);
?? ??? ??? ??? ??? ??? ?defaultWindows.remove(win);
?? ??? ??? ??? ??? ??? ?mTempWindowList.add(win);
?? ??? ??? ??? ??? ??? ?win.mDisplayContent = secondDisplayContent;
?? ??? ??? ??? ??? ??? ?if(win.mWinAnimator != null){
?? ??? ??? ??? ??? ??? ??? ?int layerStack = secondDisplayContent.getDisplay().getLayerStack();
?? ??? ??? ??? ??? ??? ??? ?if(win.mWinAnimator.mSurfaceControl!= null){
?? ??? ??? ??? ??? ??? ??? ??? ?win.mWinAnimator.mSurfaceControl.setLayerStack(layerStack);
?? ??? ??? ??? ??? ??? ??? ?}
?
?? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ?secondDisplayAddList.add(0,win);
?? ??? ??? ??? ??? ?}
?
?? ??? ??? ??? ?}
?? ??? ??? ??? ?secondDisplayWindows.clear();
?? ??? ??? ??? ?secondDisplayWindows.addAll(secondDisplayAddList);?? ??? ??? ?
?? ??? ??? ??? ?
?? ??? ??? ??? ?for (int i = 0; i < displayCount; i++) {
?? ??? ??? ??? ??? ?final DisplayContent content = mDisplayContents.valueAt(i);
?? ??? ??? ??? ??? ?assignLayersLocked(content.getWindowList());
?? ??? ??? ??? ??? ?content.layoutNeeded = true;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?Log.i("DualScreen", "WindowManagerService->allTaskIds:" + allTaskIds);
?? ??? ??? ??? ?ArrayList<ActivityStack> allStacks = getAllStacks();
?? ??? ??? ??? ?Log.i("DualScreen", "moveTransitionToSecondDisplay->allStacks:" + allStacks);
?? ??? ??? ??? ?boolean isFind = false;
?? ??? ??? ??? ?for(int i = allStacks.size() - 1; i >= 0; --i){
?? ??? ??? ??? ??? ?ActivityStack itemStack = allStacks.get(i);
?? ??? ??? ??? ??? ?//ArrayList<TaskRecord> getAllTasks()
?? ??? ??? ??? ??? ?List<TaskRecord> itemTasks = itemStack.getAllTasks();
?? ??? ??? ??? ??? ?if(itemTasks != null && itemTasks.size() > 0){
?? ??? ??? ??? ??? ??? ?for(int k = itemTasks.size() - 1; k >= 0; --k){
?? ??? ??? ??? ??? ??? ??? ?TaskRecord itemTask = itemTasks.get(k);
?? ??? ??? ??? ??? ??? ??? ?List<ActivityRecord> itemActivities = itemTask.mActivities;
?? ??? ??? ??? ??? ??? ??? ?for(int j = itemActivities.size() - 1; j >= 0; --j){
?? ??? ??? ??? ??? ??? ??? ??? ?ActivityRecord itemActivity = itemActivities.get(j);
?? ??? ??? ??? ??? ??? ??? ??? ?if(/*itemActivity.state == ActivityState.RESUMED && */itemTask.taskId != topTaskId){
?? ??? ??? ??? ??? ??? ??? ??? ??? ?curMoveTaskId = itemTask.taskId;
?? ??? ??? ??? ??? ??? ??? ??? ??? ?isFind = true;
?? ??? ??? ??? ??? ??? ??? ??? ??? ?break;
?? ??? ??? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ??? ??? ??? ?
?? ??? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ??? ?if(isFind)
?? ??? ??? ??? ??? ??? ??? ??? ?break;
?? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?if(isFind)
?? ??? ??? ??? ??? ??? ?break;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?mSecondDisplayTaskId = topTaskId;
?? ??? ??? ??? ?Log.i("DualScreen", "WindowManagerService->curMoveTaskId:" + curMoveTaskId);
?? ??? ??? ??? ?misMovingToSecond = true;
?? ??? ??? ??? ?Settings.System.putInt(mContext.getContentResolver(), Settings.DUAL_SCREEN_ICON_USED, 1);
?? ??? ??? ??? ?switchFocusWindow(curMoveTaskId);
?? ??? ??? ??? ?updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES, false);
?? ??? ??? ??? ?mAppTransition.setReady();
?? ??? ??? ??? ?performLayoutAndPlaceSurfacesLocked();
?? ??? ??? ?}finally{
?? ??? ??? ??? ?SurfaceControl.closeTransaction();
?? ??? ??? ?}
?? ??? ??? ?
?? ??? ??? ?//shouldAppMoveBack(-1);
?? ??? ?}
?? ??? ?
?? ??? ?Binder.restoreCallingIdentity(origId);
?? ??? ?
?? ?}
?? ?
?? ?
?? ?public void moveWindowToSecondDisplayWithDualShow(){
?? ??? ?long origId = Binder.clearCallingIdentity();
?? ??? ?int secondDisplayTaskId = getSecondDisplayTaskId();
?? ??? ?int currentFocusedTaskId = -1;
?? ??? ?int curMoveTaskId = secondDisplayTaskId;
?? ??? ?if(mFocusedApp != null && mFocusedApp.mTask != null)
?? ??? ??? ?currentFocusedTaskId = mFocusedApp.mTask.mTaskId;
?? ??? ?Log.i("DualScreen", "WindowManagerService->moveWindowToSecondDisplayWithDualShow->currentFocusedTaskId:" + currentFocusedTaskId);
?? ??? ?//mSecondDisplayTaskId = currentFocusedTaskId;
?? ??? ?synchronized(mWindowMap){
?? ??? ??? ?if(mDisplayContents == null || mDisplayContents.size() <= 1){
?? ??? ??? ??? ?return;
?? ??? ??? ?}
?? ??? ??? ?final int displayCount = mDisplayContents.size();
?? ??? ??? ?DisplayContent defaultContent = getDefaultDisplayContentLocked();
?? ??? ??? ?int displayId = 0;
?? ??? ??? ?DisplayContent secondDisplayContent = null;
?? ??? ??? ?for(int i = 0; i < displayCount;i++){
?? ??? ??? ??? ?final DisplayContent content = mDisplayContents.valueAt(i);
?? ??? ??? ??? ?if(content != defaultContent){
?? ??? ??? ??? ??? ?secondDisplayContent = content;
?? ??? ??? ??? ??? ?displayId = secondDisplayContent.getDisplayId();
?? ??? ??? ??? ??? ?Log.d("DualScreen", "WindowManagerService->moveWindowToSecondDisplayWithDualShow->secondDisplayId:" + displayId);
?? ??? ??? ??? ??? ?break;
?? ??? ??? ??? ?}
?? ??? ??? ?}
?
?? ??? ??? ?if(secondDisplayContent == null){
?? ??? ??? ??? ?return;
?? ??? ??? ?}
?? ??? ??? ?if(!okToDisplay()){
?? ??? ??? ??? ?return;
?? ??? ??? ?}
?? ??? ??? ?SurfaceControl.openTransaction();
?? ??? ??? ?WindowState win = null;
?? ??? ??? ?try{
?? ??? ??? ??? ?WindowList secondDisplayAddList = new WindowList();
?? ??? ??? ??? ?WindowList defaultDisplayAddList = new WindowList();
?? ??? ??? ??? ?WindowList secondDisplayWindows = secondDisplayContent.getWindowList();
?? ??? ??? ??? ?WindowList defaultWindows = defaultContent.getWindowList();
?? ??? ??? ??? ?
?? ??? ??? ??? ?if(mTempWindowList != null && mTempWindowList.size() > 0)
?? ??? ??? ??? ??? ?defaultWindows.addAll(mTempWindowList);
?? ??? ??? ??? ?mTempWindowList.clear();
?? ??? ??? ??? ?
?? ??? ??? ??? ?for(int i= defaultWindows.size()-1;i>=0;i--){
?? ??? ??? ??? ??? ?win = defaultWindows.get(i);
?? ??? ??? ??? ??? ?if(win == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?if (win.mAppToken == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ??? ?if(win.mAppToken.mTask == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?int windowTaskId = win.mAppToken.mTask.mTaskId;
?? ??? ??? ??? ??? ?if(windowTaskId == currentFocusedTaskId){
?? ??? ??? ??? ??? ??? ?defaultWindows.remove(win);
?? ??? ??? ??? ??? ??? ?win.mDisplayContent = secondDisplayContent;
?? ??? ??? ??? ??? ??? ?if(win.mWinAnimator != null){
?? ??? ??? ??? ??? ??? ??? ?int layerStack = secondDisplayContent.getDisplay().getLayerStack();
?? ??? ??? ??? ??? ??? ??? ?if(win.mWinAnimator.mSurfaceControl!= null){
?? ??? ??? ??? ??? ??? ??? ??? ?win.mWinAnimator.mSurfaceControl.setLayerStack(layerStack);
?? ??? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ??? ?
?? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ?secondDisplayAddList.add(0,win);
?? ??? ??? ??? ??? ?}
?
?? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ?
?? ??? ??? ??? ?for(int i= secondDisplayWindows.size()-1;i>=0;i--){
?? ??? ??? ??? ??? ?win = secondDisplayWindows.get(i);
?? ??? ??? ??? ??? ?if(win == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?if (win.mAppToken == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ??? ?if(win.mAppToken.mTask == null){
?? ??? ??? ??? ??? ??? ?continue;
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ?int windowTaskId = win.mAppToken.mTask.mTaskId;
?? ??? ??? ??? ??? ?if(windowTaskId == secondDisplayTaskId){
?? ??? ??? ??? ??? ??? ?secondDisplayWindows.remove(win);
?? ??? ??? ??? ??? ??? ?win.mDisplayContent = defaultContent;
?? ??? ??? ??? ??? ??? ?if(win.mWinAnimator != null){
?? ??? ??? ??? ??? ??? ??? ?int layerStack = defaultContent.getDisplay().getLayerStack();
?? ??? ??? ??? ??? ??? ??? ?if(win.mWinAnimator.mSurfaceControl!= null){
?? ??? ??? ??? ??? ??? ??? ??? ?win.mWinAnimator.mSurfaceControl.setLayerStack(layerStack);
?? ??? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ??? ?
?? ??? ??? ??? ??? ??? ?}
?? ??? ??? ??? ??? ??? ?defaultDisplayAddList.add(0,win);
?? ??? ??? ??? ??? ?}
?
?? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ?//secondDisplayWindows.clear();
?? ??? ??? ??? ?secondDisplayWindows.addAll(0,secondDisplayAddList);
?? ??? ??? ??? ?//defaultWindows.clear();
?? ??? ??? ??? ?defaultWindows.addAll(0, defaultDisplayAddList);
?? ??? ??? ??? ?for (int i = 0; i < displayCount; i++) {
?? ??? ??? ??? ??? ?final DisplayContent content = mDisplayContents.valueAt(i);
?? ??? ??? ??? ??? ?assignLayersLocked(content.getWindowList());
?? ??? ??? ??? ??? ?content.layoutNeeded = true;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?//Log.i("DualScreen", "WindowManagerService->moveWindowToSecondDisplayWithDualShow->allTaskIds:" + allTaskIds);
?? ??? ??? ??? ?ArrayList<ActivityStack> allStacks = getAllStacks();
?? ??? ??? ??? ?Log.i("DualScreen", "WindowManagerService->moveWindowToSecondDisplayWithDualShow->allStacks:" + allStacks);
?? ??? ??? ??? ?mSecondDisplayTaskId = currentFocusedTaskId;
?? ??? ??? ??? ?Log.i("DualScreen", "WindowManagerService->moveWindowToSecondDisplayWithDualShow->curMoveTaskId:" + curMoveTaskId);
?? ??? ??? ??? ?misMovingToSecond = true;
?? ??? ??? ??? ?Settings.System.putInt(mContext.getContentResolver(), Settings.DUAL_SCREEN_ICON_USED, 1);
?? ??? ??? ??? ?switchFocusWindow(curMoveTaskId);
?? ??? ??? ??? ?updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES, false);
?? ??? ??? ??? ?mAppTransition.setReady();
?? ??? ??? ??? ?performLayoutAndPlaceSurfacesLocked();
?? ??? ??? ?}finally{
?? ??? ??? ??? ?SurfaceControl.closeTransaction();
?? ??? ??? ?}
?? ??? ??? ?
?? ??? ??? ?//shouldAppMoveBack(-1);
?? ??? ?}
?? ??? ?
?? ??? ?Binder.restoreCallingIdentity(origId);
?? ?}


4.副屏頁(yè)面如何全屏顯示?修改PhoneWindowManager.java下layoutWindowLw方法添加代碼如下:

? ? ?pf.top = df.top = of.top = cf.top = vf.top = 0;
? ? ?pf.right = df.right = of.right = cf.right = vf.right = width;
? ? ?pf.bottom = df.bottom = of.bottom = cf.bottom = vf.bottom = height;

---------------------?
作者:默默等待__007?
來(lái)源:CSDN?
原文:https://blog.csdn.net/u011365633/article/details/55001840?
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!

總結(jié)

以上是生活随笔為你收集整理的Android双屏异显的实现的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。