Discussion Forums  >  Uncategorized

Replies: 3    Views: 178

dkeds66
Aspiring developer
Profile
Posts: 91
Reg: Jan 18, 2012
Swindon
910
02/02/12 10:08 AM (14 years ago)

Pop Ups - BT v1.5 Android

Does BT v1.5 Android support Information/Warning Pop Ups or do I need to build these in using something like HTML/PHP? I basically just want to add an Information Icons at various places in my App but rather than trigger a different full sized screen when selected, want it to trigger a pop up to appear with the current screen.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/06/12 12:42 PM (14 years ago)
Pop Up Info: The easter way to show a quick little 'info window' will be to trigger the showAlert(String theTitle, String theMessage) method in the BT_activity_base.java class. Because all of the screen in you app (the Activities) are sub-classes of the BT_activity_base.java class, you can call this method anywhere in your code by simply doing: showAlert('this is the title', 'this is the message'); The little pop-up window will show along with a close button. This is useful for many situations, especially for showing some quickie info. Also, you'll want to fire this method by adding an onClickListener to a button, image, whatever you want to click. The onClickListener will in turn trigger the showAlert() method. Like... this.myButton = (Button)this.findViewById(R.id.myButton); this.myButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showAlert('this is the title', 'this is the message'); } }); Simple example of many ways to set a client listener to an object.
 
dkeds66
Aspiring developer
Profile
Posts: 91
Reg: Jan 18, 2012
Swindon
910
like
02/06/12 03:20 PM (14 years ago)
Thanks David will take a look at this
 
futurenmc
Aspiring developer
Profile
Posts: 27
Reg: Nov 28, 2011
Carolina
270
like
02/17/12 10:26 AM (13 years ago)
Hey thats a great idea is there an easy way to put a check box in the corner to make it only appear once? for example..... {}dont show this message again. ?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.