List of usage examples for android.view View postInvalidate
public void postInvalidate()
Cause an invalidate to happen on a subsequent cycle through the event loop.
From source file:Main.java
public static void forcePostInvalidate(AdapterView<?> parent, int position) { final View itemView = getItemViewIfVisible(parent, position); if (itemView != null) itemView.postInvalidate(); }
From source file:Main.java
/** * @see android.view.View#postInvalidateOnAnimation() *//*from w ww . j a v a 2 s . c o m*/ public static void postInvalidateOnAnimation(View view) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { view.postInvalidateOnAnimation(); } else { view.postInvalidate(); } }
From source file:com.collabora.xwperf.notxw_contacts.MainActivity.java
@Override public void onClick(View v) { if (v == fpsGraph) { v.postInvalidate(); } }
From source file:com.urbantamil.projmadurai.BookListActivity.java
@Override public void onClick(View v) { Button btn = (Button) v; do_clear_action(); v.postInvalidate(); }
From source file:com.android.mail.browse.ConversationContainer.java
private View addOverlayView(int adapterIndex, boolean postAddView) { final int itemType = mOverlayAdapter.getItemViewType(adapterIndex); final View convertView = mScrapViews.poll(itemType); final View view = mOverlayAdapter.getView(adapterIndex, convertView, this); mOverlayViews.put(adapterIndex, new OverlayView(view, itemType)); if (convertView == view) { LogUtils.d(TAG, "want to REUSE scrolled-in view: index=%d obj=%s", adapterIndex, view); } else {/*from ww w . ja v a 2s . co m*/ LogUtils.d(TAG, "want to CREATE scrolled-in view: index=%d obj=%s", adapterIndex, view); } if (view.getParent() == null) { addViewInLayoutWrapper(view, postAddView); } else { // Need to call postInvalidate since the view is being moved back on // screen and we want to force it to draw the view. Without doing this, // the view may not draw itself when it comes back on screen. view.postInvalidate(); } return view; }