List of usage examples for org.apache.cordova LinearLayoutSoftKeyboardDetect LinearLayoutSoftKeyboardDetect
public LinearLayoutSoftKeyboardDetect(Context context, int width, int height)
From source file:com.AlcaldiaSucre.App.CordovaActivity.java
License:Apache License
/** * Called when the activity is first created. * * @param savedInstanceState/*from w ww.ja v a 2 s.c o m*/ */ @SuppressWarnings("deprecation") @Override public void onCreate(Bundle savedInstanceState) { checkIntents(); Config.init(this); LOG.d(TAG, "CordovaActivity.onCreate()"); super.onCreate(savedInstanceState); if (savedInstanceState != null) { initCallbackClass = savedInstanceState.getString("callbackClass"); } if (!this.getBooleanProperty("ShowTitle", false)) { getWindow().requestFeature(Window.FEATURE_NO_TITLE); } if (this.getBooleanProperty("SetFullscreen", false)) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } else { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } // This builds the view. We could probably get away with NOT having a LinearLayout, but I like having a bucket! Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); root = new LinearLayoutSoftKeyboardDetect(this, width, height); root.setOrientation(LinearLayout.VERTICAL); root.setBackgroundColor(this.backgroundColor); root.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 0.0F)); // Setup the hardware volume controls to handle volume control setVolumeControlStream(AudioManager.STREAM_MUSIC); }