停止handler.postDelayed()
我通过new Handler()。postDelayed(new Runnable().....来调用多个Handler。当我单击返回时如何停止它? public class MyActivity extends AppCompatActivity implements OnClickListener { private Button btn; private Handler handler; private Runnable myRunnable; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); btn = (Button) findViewById(R.id.trainingsstart); btn.setOnClickListener(this); } @Override public void onClick(View v) { Handler handler = new Handler(); Runnable myRunnable = new Runnable() { …