List of usage examples for android.gesture GestureOverlayView setLayoutParams
public void setLayoutParams(ViewGroup.LayoutParams params)
From source file:Main.java
/** * add GestureOverlayView to an activity * @param activity//from ww w.j a va 2 s . c o m * @return added GestureOverlayView */ public static GestureOverlayView addGestureViewToActivity(Activity activity) { View contentView = getContentView(activity); GestureOverlayView view = new GestureOverlayView(activity); view.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 1)); activity.setContentView(view); view.addView(contentView); // adds the PhoneGap browser view.getChildAt(0).setLayoutParams(new FrameLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT, 1)); activity.setContentView(view); view.setGestureVisible(false); return view; }