I need the image button to be visible when the user opens another app, you know, i need it like the floating button that is visible to the user when the user opens any other app.
i have a switch button the controls if the image button is visible or not
Have a look at this question.
Essentially you need to use the SYSTEM_ALERT_WINDOW permission which allows you to draw over other apps, make a custom layout file which contains the button that you want to show and use the WindowManager to insert it into the view.
Related
I want to show a draggable view floating on my activities.
I do not want to ask user for permission like
User should be able to interact with activity while the draggable view is open.
The draggable view should not disappear user go to next activities.
Instead, user can manually close the view(eg: by clicking on the cross icon on the view).
I am able to create a draggable view and able to interact with it, at the same time with the activity which is in foreground. but when I go to the other activity, the view closes.
![Adding buttons on top of the default call screen of android][1]
http://i.stack.imgur.com/SJ8Pc.jpg
As shown in the below image, there are two buttons one is Live video button and the other is Picture share button, how to add those button on top of the default android call screen while making call.
Thanks,
Android F
I believe the way to do this is to draw views on top of the dialer activity. This is similar, in implementation, to the Facebook home chatHead feature. Have a look at this article, which shows how to draw any view: http://www.piwai.info/chatheads-basics/
In your case, your view would be a LinearLayout containing two buttons.
I have a bar in my app with 2 buttons side by side. One button represents the page the user is currently on and the other redirects the user to another page with the same button bar. What I want is for the button that represents the page the user is currently on to look like it is pressed (i.e. the color it would be if it is pressed). I already have it set so it can't be clicked. Is there a setting or attribute or do I HAVE to create my own selector (because I don't really understand how to implement that)?
Have never tried this but
button.setPressed(true)
should work.
Edit: You can also add
button.setClickable(false)
Edit: This does work but the order is important. Use this
btn.setClickable(false);
btn.setPressed(true);
I trying add arrow buttons to my app. I dont know how to show arrows on button ?
http://www.bestandroidappsreview.com/2010/09/build-vocabulary-sat-gre-buddy-android-app.html
otherwise , I want some suggestion on what would a good interface for traversing of records for next and previous ??
To show an Arrow on button, You need to have an Images for the Arrow. Usually when you use Image button, it keeps the background of the button as normal button so you can not have a look and feel like the one you have.
The Best option is use ImageView instead of Button or ImageButton and Use Arrow Images to show Arrows.
I want to add a button on the home screen and want to code in the click event of that button.
I have an application which has an activate button,As soon as this activate button is clicked i want that a Button gets created on the home screen and i want to code some database queries in its click event.I have already created that application,Now i want to place the button on the home screen.How do i do that.
Thanks in Anticipation.
I don't think you can create a button on the Home Screen on-the-fly by coding. In my book, the only way to get a button on the Home Screen is if the user adds it as a widget.
If you are using xml layout for it add the button widget you needed and set it's visibility by android:visibility="gone",when you clicked the first button to activate the button to display,make it to visible by getting the id of the corresponding button
for eg: btn2.setVisibility(View.VISIBLE);