Pause Program Between Adding And Removing A Textview
I'm working on a tank-game and I have a TextView which represents the shot. Now I want to display the TextView at the specific point and remove it after a second that it looks like
Solution 1:
probably need to run the remove command on main thread
Handler mainHandler = new Handler(context.getMainLooper());
Runnable myRunnable = new Runnable() {
@Override
public void run() {
layout.removeView(textView);
}
};
mainHandler.post(myRunnable);
Post a Comment for "Pause Program Between Adding And Removing A Textview"