I am extending a scene using call The view is being inflated to the sole purpose of turning it into a bitmap. The following call is not being made. Now if I'd call in a DialogFragment the I want to make a non-zero amplitude to make my bitmap to say get null for the needs of this method because I otherwise,
last view view = MActivity.getLayoutInflater () .inflet (R.Latite.photo_view, empty, incorrect);
onCreateView
- I know the code snippet only works but if I just grew scene to bitmap conversion method public void Global layout ()
is never said nothing
Wutryobrhwar Wutryobersser = Wukgetwutryobsrhwar (); If (viewTreeObserver.isAlive ()) {Log.i (TAG, "Waiting for the right time"); View.getViewTreeObserver () AddOnGlobalLayoutListener (new ViewTreeObserver.OnGlobalLayoutListener () override public void on @GolobalLayout {@SuppressLint ( "NewApi") (if .height & lt (view.getLayoutParams). Width & lt; = 0 || view.getLayoutParams (); = 0) {int height = getDeviceHeight (mActivity); int width = getDeviceWidth (mActivity); LayoutParams layout = view.getLayoutParams (); layout.height = height; layout.width = width; view.setLayoutParams (layout);} doMyWork (see), if (Utils.hasJellyBean ()) {view.getViewTreeObserver () removeOnGlobalLayoutListener (this); ..} else {view.getViewTreeObserver () removeGlobalOnLayoutListener (this);}}}); }
view.getDrawingCache ()
. So how do I force execution of after the viewTreeObserver.OnGlobalLayoutListener
No comments:
Post a Comment