i m developing application in which i have to change the background image on different tab..
i m using linear layout to change background for different activity..i m getting output but..my background image is not fill parent ...i want to set background image in whole screen..do u have any idea how can i do that??
Check your device screen size and your background image size.
thank you buddy..
i found the answer...i declared Tab host object statically and on click of tab,different activity get called..and i changed the backgrond of tab host by code..and its work...
Related
I implemented tabs. In which I have set the background for each tabs using
getTabHost().getTabWidget().getChildAt(1).setBackgroundResource(R.drawable.tabimg);
Now When I select the particular tab I want to enlarge the image of the tab like i it has shown in image.
Is it possible in android.
If yes, then how? Please suggest.
Thanks in advance.
I was not able to find anything. So In this case if anyone else also have the same issue, so what I have done. I have taken a image till the icon and the next image strip covering that text on that respective position and that strip I have set in linear layout. So now if I click on the tab the image look exactly like shown in the photo.
Most apps that maintain active state in a menu listView also provide a small imageView visual in addition to color change.
How would you do this?
Would it be a part of the state_activated=true selector somehow, or should it be done programatcally in Java and perhaps in the ListAdapter?.
In the image below, you see on the Youtube app, the acte state has BOTH Background image change AND the visual indicator. (Red Line)
You can do that by make 9 patch image and use it as background when the row activate.
I am creating one application , in that application i used background for button . Background image has outer glow, so when i set that image to button background it shows me black color instead of outer glow image .
How can resolve this issue ? Please help me to solve this.
Here i add two images .
1) Image in which i got problem of outer glow.
2) Actual image used in button background.
heres a link that explains different button presses a good clear explanation
http://eagle.phys.utk.edu/guidry/android/AnimalSounds.html
I have created a shiny button in photoshop and now wish to use it for the background of a button on an android layout. Every time I change the buttons buttons background property it inserts the button but it does not fill the entire background but instead seems to push the boundaries of the button away from it as if there were huge amounts of padding! I have not altered the buttons padding properties either! I have previously been successful in filling the buttons entire background with buttons already created that I downloaded from the internet but I dont know if the were created in photoshop......however I did resize these buttons in photoshop and then successfully use them. Please see the image attached and notice the blue outline of the button whose background I am trying to fill! Any help is greatly appreciated!!!!
Try this: http://developer.android.com/guide/developing/tools/draw9patch.html
I want to create a TAB-like activity.
The regular tab host has a specific design.
I want the tab buttons to be image views without any BG.
And by clicking on the image will just change the tab the regular way?
Maybe there is a way to do it in the regular TAB host?
I will be more specfici - the 2 buttons are actually 2 image views (also has 1 png for selected and 1 png for unselected). These 2 images are on the main BG (unlike the UI of the TAB Host). Upper to them there is the area (e.g. Frame) where my 2 activites should be ... Both activities has listview in it.
Check these:
Custom Android Tabs
Customize Android TabHost TabWidget
yes . you can do it . create yourView.xml and set this to TabSpec.setIndicator(View)
A simple solution will be to create 2 separate views for the 2 tabs, then depending on which button (Tab1 or Tab2) is clicked, make the corresponding view visible and the other gone.
And of course you can give whatever background image to the buttons you want.