线程的Java / Android的 [英] Thread in Java/Android

查看:73
本文介绍了线程的Java / Android的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候。

如何发送两个参数到一个线程和运行的方法时,用户按下显示器上的按钮。有我的变量在UI线程没有工作,得一干二净时,UI线程随机重启。

How can I send two parameters into a thread and run methods when the user pushes buttons on the display. Having my variables in the UI thread didn't work and were erased when the UI thread randomly restarts.

UI线程 _ __ _ __ _ __ _ 的____ 其他主题

UI Thread ______________ Other Thread

用户presses按钮------->运行方法

User presses button -------> Run Method

干杯。

推荐答案

有一个在这个<一个href=\"http://www.eigo.co.uk/Threads-and-Progress-Dialogs-in-Android-Screen-Orientation-Rotations.aspx\"相对=nofollow>博客文章。它描述了如何让一个线程在整个屏幕旋转工作。

Have a look at this blog article. It describes how to keep a thread working across screen rotation.

这篇关于线程的Java / Android的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆