Detect As Well As Banking Corporation Gibe If Your App Piece Of Job Inward Multi Window Mode

Posted on

This event present how to detect in addition to banking company check if your app endure inwards multi window mode, target Android due north amongst Multi-Window Support, past times calling isInMultiWindowMode() in addition to override onMultiWindowModeChanged() methods.

package com.blogspot.android_er.androidmultiwindow;  import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView;  populace shape MainActivity extends AppCompatActivity {      TextView textPrompt;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         textPrompt = (TextView)findViewById(R.id.prompt);          if(isInMultiWindowMode()){             textPrompt.setText("onCreate endure In Multi Window Mode ");         }else{             textPrompt.setText("onCreate endure NOT In Multi Window Mode ");         }     }      @Override     populace void onMultiWindowModeChanged(boolean isInMultiWindowMode) {         super.onMultiWindowModeChanged(isInMultiWindowMode);          if(isInMultiWindowMode){             textPrompt.setText("It is In Multi Window Mode ");         }else{             textPrompt.setText("It is NOT In Multi Window Mode ");         }     } }  

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:padding="16dp"     android:orientation="vertical"     tools:context="com.blogspot.android_er.androidmultiwindow.MainActivity">      <TextView         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_margin="20dp"         android:layout_gravity="center_horizontal"         android:autoLink="web"         android:text="https://rootandroid.org//"         android:textStyle="bold"/>     <TextView         android:id="@+id/prompt"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:textSize="28dp"         android:textStyle="bold"/> </LinearLayout>  

Next:
– onConfigurationChanged() called when window size changed inwards Multi-Window Mode