Nico wrote:
> Hi,
> I need to replace the current View (set by the activity.setContentView
> method) by an other.
> When I call activity.setContentView two times, I get this exception :
> 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot
> $CalledFromWrongThreadException: Only the o
you are probably calling from a seperate thread..after thread has done its
wrk...use the handler and change the view..
On Wed, Jan 21, 2009 at 7:49 PM, Nico wrote:
>
> Hi,
> I need to replace the current View (set by the activity.setContentView
> method) by an other.
> When I call activity.setCo
i have one question around the runOnUiThread...Basically when i used this
method in the onCreate/onStart of the Activity,i found that it works quite
differently than i expect..
For example in the onCreate/onStart..say I have long running operation
before which i want to render the UI with a progre
I did it :
// Create a thread to change the view
final Grid f_grid = grid;
Runnable mainThreadRunnable = new Runnable() {
public void run() {
m_activity.setContentView(f_grid);
Nico wrote:
> I did it :
>
> // Create a thread to change the view
> final Grid f_grid = grid;
> Runnable mainThreadRunnable = new Runnable() {
> public void run() {
> m_activity.setContentView(f_grid);
Thx a lot for help.
On 21 jan, 16:02, Mark Murphy wrote:
> Nico wrote:
> > I did it :
>
> > // Create a thread to change the view
> > final Grid f_grid = grid;
> > Runnable mainThreadRunnable = new Runnable() {
> > public void run() {
> >
any help on this ??
On Wed, Jan 21, 2009 at 8:13 PM, for android wrote:
> i have one question around the runOnUiThread...Basically when i used this
> method in the onCreate/onStart of the Activity,i found that it works quite
> differently than i expect..
>
> For example in the onCreate/onStart..
The point of runOnUiThread() *is* to run code on the UI thread.
Therefore it must NOT be used for long running operations. Usually
runOnUiThread() is invoked from another thread.
On Wed, Jan 21, 2009 at 7:50 PM, for android wrote:
> any help on this ??
>
> On Wed, Jan 21, 2009 at 8:13 PM, for an
Oh ok..I think I understand it now..
On Thu, Jan 22, 2009 at 9:23 AM, Romain Guy wrote:
>
> The point of runOnUiThread() *is* to run code on the UI thread.
> Therefore it must NOT be used for long running operations. Usually
> runOnUiThread() is invoked from another thread.
>
> On Wed, Jan 21, 2
9 matches
Mail list logo