Is it possible to change the size of the tabs displayed in a TabActivity? I'm currently only putting text in my tabs and I'd really like to minimize the size as much as possible.
Also, is there a way to use icons for my activity that aren't 48x48? I'd like to do something more rectangular as opposed to square. I just want to use my screen real-estate the best I can :)
How is the YouTube app doing this? (See screenshot, and yes I know that the YouTube app isn't open source)
It seems that they're also making it possible to scroll left and right for more tabs. Any ideas on how they're doing this?
Yest you can do all that by creating your own custom view for tab widget, it is quite simple to do. this tutorial will do the trick
http://joshclemm.com/blog/?p=136
Related
I would like to have in my activity the widget like this in the top of that screen. I do not think about clock, but about that 5 balls, and I want to use it the same way - when I change screen then white ball is changing too. I was looking for information about it on Android Developer but I can't found any tips. What type of widget I have to use or do I have to write all code for this from zero?
It calls ViewPagerIndicator
here is https://github.com/bigsolom/AndroidViewPagerIndicator
custom ViewPager indicator the mimics nexus-5 launcher style (small circles and the selected page is a bigger circle)
hope that will be helpful
I have 2 screens black with scroll View in it and then I would like to change these screen with a swipe. I am using Android Studio and want to have a simple example so that i could change all the screens from one to other using swipe view. I hope the best example from the all the best developers on opposite side.
Thanks.
View Pager will be the best suited component. There are a lot of samples available in the net.
Can you please tell me how to make this type of pop up? I do not need to design own component in drawable. I don't have much knowledge in Android.
1) First there is Title with blue background .
2) Second there is scrolling list view (without image) and buy button (without image).
Is it possible?
I Googled it to find out if we can make own button like that with some style?
Here is my image
You have to use a Dialog/Pop up in combination with a ListView you have to google that up because its a complex theme.
good look
Start from http://developer.android.com/guide/topics/ui/dialogs.html. You have to implement your own custom dialog layout, likely using a ListView (http://developer.android.com/guide/topics/ui/layout/listview.html).
Android provides the SlidingDrawer by default looks like below image -
Image http://www.gru.at/android/wp-content/uploads/2010/09/s_open.png
Can we customize this SlidingDrawer looks like semi-circle type with buttons included. For, example take a look at below image -
Anyone done the SlidingDrawer like above one. I've googled it. Didn't get any nice solution for this. Anyone has idea/example blog for this?
So make sure you have Gimp and 9-Patch at the ready for a lot of trial and error...
Then what you wanna do is...
Add suitable layout to hold buttons where the current ImageView Handle is, like Horizontal LinearLayout or RelativeLayout
Cut the id of the current ImageView Handle and add it to this new Layout you just added
add your buttons to the LinearLayout/RelativeLayout (you can test it now, the buttons and the handle should all slide open at the same time)
Now add Button listeners for each of the buttons
Set the SlidingDrawer to android:allowSingleTap = "false" (tit for tat, you cant have the single tap option anymore, just the slide)
Use a ButtonSelector.xml to have different layouts for buttons be pressed or not pressed.
This is the hard part. Edit the drawables for the buttons, and handle so that they will fit together nicely if the screen is huge, small, landscape, portrait. I recommend using 9-Patch in conjunction with Gimp.
Pat yourself on the back because you now have a totally sweet custom sliding drawer.
Make sure you post pictures and state any problems or issues you ran into as I have never fully implemented this, but I did get to step 6 to make sure it was possible.
Last but not least, Good Luck...
Thanks for RelativeLayout and FrameLayout These layouts makes my requirement comportable with what i need. I've done like below steps -
First, i've splitted the full image into three pieces. And, merge these images with FrameLayout And, gave onclickListner to my center of image(Because, it was contain that arrow marks up/down)
And, i've used the Animation for just to open that View as SlidingDrawer
These steps helps me lot.
I want to make an application which will look like android home screen. where I want to place some icons. it will have 10 pages. I want to do scroll between these pages.
How to achieve this? Plz help.
Thanks.
I'm not sure how to archive the home-screen like switching but for the icons, you can use a GridView. To switch between the pages, a TabLayout could be used. Also I found this, which might be what you're searching for.
But there might be bettwer ways of doing this...