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 7955039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:36:46+00:00 2026-06-04T03:36:46+00:00

I have a win1 and it has a button to close it. Also I

  • 0

I have a win1 and it has a button to close it.
Also I have a button to create a view1.
view1 has a button to hide it.

When I click the hide button on the view1, the button on the win1 which supposed to create the view1 when clicked, becomes disabled. Why is it? It is only a problem in Android. Please help. Thank you.

var win1 = Titanium.UI.currentWindow;

var closeButton = Titanium.UI.createButton({
image:'images/icontest.png',
backgroundImage: 'none',
top:0,
right:0
    });

closeButton.addEventListener('click',function()
{
    win1.close({transition:Ti.UI.iPhone.AnimationStyle.CURL_DOWN});
});

 win1.add(closeButton);


 //Main view & button

  var view1=Ti.UI.createView({  
  backgroundColor: '#fff',
      borderColor: '#888',
      borderWidth: 4,
      height: 172,
      width: 275,
      top:50,
      opacity: 0.75,
      borderRadius: 8
      });

  var closeButton2 = Titanium.UI.createButton({
  image:'images/icontest.png',
  backgroundImage: 'none',
  top:0,
  right:0
      });

  closeButton2.addEventListener('click',function()
{
    view1.hide();
});

  view1.add(closeButton2);

  var OpenButton = Titanium.UI.createButton({
  image:'images/icontest.png',
  backgroundImage: 'none',
  top:100,
  right:50
      });

   OpenButton.addEventListener('click',function()
  {
    win1.add(view1);
  });

   win1.add(OpenButton);
  • 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-06-04T03:36:48+00:00Added an answer on June 4, 2026 at 3:36 am

    You are adding view1 every time OpenButton is clicked. Actually you want to show view1 when OpenButton is clicked. So what you should do is:

    OpenButton.addEventListener('click',function()
    {
        view1.show();
    });
    

    and view1 should be added outside of OpenButton.addEventListener. Like this:

    win1.add(OpenButton);
    win1.add(view1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to create a file which has all the KeyPairs I need to
I have a table results, which has he following columns: ID TestCase Platform 1
Have a simple one-off tasks which needs a progress bar. OpenSSL has a useful
Have a matrix report now that has Position, Hours and Wages for a location
I have a tabGroup and it holds 3 tabs. Code in app.js: // create
Have just started using Visual Studio Professional's built-in unit testing features, which as I
So I have code like: <ul> <li><FORM><INPUT class=eButton type=button value=stream1! onClick=window.open('./CSI1.html','win1','width=400,height=200,left=0,top=100,screenX=0,screenY=100')> </li> <li><FORM><INPUT class=eButton
Have any one tried to activate fancybox thumbnail gallery using a button or an
Have anyone used Redmine Documentor which lets you convert PHP to HTML to Redmine
Have an app that can use tts to read text messages. It can also

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.