Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7679257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:50:12+00:00 2026-05-31T17:50:12+00:00

I have two views.In first view, I have a table view and I am

  • 0

I have two views.In first view, I have a table view and I am displaying remote data in its cells. I am showing activity indicator while data downloading.

Second view gets open when any of row is selected.

When I come back to the first view, I am refreshing the table view by downloading remote data.

But in Android, when I come back to first view and start downloading data, application gets crash due to activity indicator !!! Application crashes only in Android, its working fine in iPhone !!

I am refreshing the table’s data in focus event of current window.

the error : –

Activity org.appcelerator.titanium.TiActivity has leaked window
com.android.internal.policy.impl.PhoneWindow$DecorView@450c4488 that
was originally added here E/WindowManager( 324):
android.view.WindowLeaked: Activity
org.appcelerator.titanium.TiActivity has leaked window
com.android.internal.policy.impl.PhoneWindow$DecorView@450c4488 that
was originally added here

and

(main) [2225,140482] Sending event: exception on thread: main
msg:java.lang.IllegalArgumentException: View not attached to window
manager; Titanium 1.8.1,2012/01/27 17:31,a24502a E/TiApplication(
324): java.lang.IllegalArgumentException: View not attached to window
manager

EDITED

my code : –

var currentWindow = Titanium.UI.currentWindow;

var placeTableData = [] ;
var placeTableView = Titanium.UI.createTableView
({
    data:placeTableData,
    top:'0dp',
    height:'365dp'
});

currentWindow.addEventListener('focus',winopened);
function winopened(e)
{
    placeTableData = createRow();
}

function createRow() 
{   
    currentWindow.add(activity);
    activity.show();    
    currentWindow.touchEnabled = false;

    // downloading data 

    if(loader1.DONE)
    {
        currentWindow.touchEnabled = true ;
        activity.hide();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:50:13+00:00Added an answer on May 31, 2026 at 5:50 pm

    Solved !!! I found that, in Android, when you press back button, it doesn’t handle proper navigation to the previous view. It simply displays previous view without take care of current view.

    So it necessary to close current view properly before displaying another view. So I closed current view before displaying the previous view.

    When we press back button on Android, android:back event of Window get call. So I closed current window in this method , like :

    Titanium.UI.currentWindow.addEventListener('android:back',function(e)
    {
        Ti.API.info('back button pressed');
        currentWindow.close();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two views with navigation controller: first view, there are empty text fields
I have two classes. In my first class i have table view which contains
I have two view controllers that allow changes to the Address Book. The first
I have two views that I would like to combine into one. The first
I have two views, one view takes the whole screen, the second view covers
I have two views within one .xib (one view for landscape, another for portrait).
I have two tabbar items(views) that use the same data, whats the best solution
I have a nib that contains two TableViews. The table views are of the
I have a two views, 1st is a simple view with some introduction about
I have two view controllers. I'm on first, and when I press the button,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.