Questions tagged [android-controls]

24 questions
10
votes
2 answers

how to change the color RatingBar depending on the number of stars?

How do the following? if RatingBar has 1-3 stars - red stars. if RatingBar has 4 stars - yellow stars. if RatingBar has 5 stars - green stars. ((RatingBar)…
Valera Valerianov
  • 247
  • 1
  • 3
  • 14
8
votes
2 answers

How to display a text vertically or rotate a TextView in layout XML file?

I want to display a string vertically in a view as below, is there have a way to implement that in layout XML file?
sunjinbo
  • 2,137
  • 4
  • 22
  • 45
7
votes
4 answers

Resize android datepicker control

How can one resize the initial size of android datepicker control to be smaller or bigger. Is there only way to reimplement it?
Artem Barger
  • 40,769
  • 9
  • 59
  • 81
3
votes
2 answers

How to launch application on swipe in corners of android home screen or it may be any screen like lazy swipe

I am developing an app like Lazy Swipe how to launch the app like this from bottom/top corners of screen and how to implement circular scrolling .
Suren
  • 57
  • 1
  • 8
3
votes
0 answers

How to add video controllers like play/pause and seeker to a TextureView (Surface)

i have an activity with a TextureView, a Surface and a MediaPlayer that is playing videos, but no controllers appear. I googled for a while but coudnt find a solution. How can i make a play/pause and a seeker available? Code: public class…
3
votes
2 answers

Android UI control like tag control

I want to know how to get a control that contains list of strings arranged as in an image bellow. you can see the strings strings added in random way based on its width I tried to use normal textview with inside a linear or relative layout with…
John Donvan
  • 554
  • 8
  • 22
2
votes
1 answer

Android Gallery control order of touch events not in sync with getChildDrawingOrder

I am building a custom android control extending Gallery. I need an effect of views being overlaid so I am issuing setSpacing(-60); Once I give this, I have three icons in the Gallery, 1, 3 drawn first and then 2 which is the center one. The rules…
2
votes
1 answer

Can't find Honeycomb switch ON/OFF control

On the page 19 of this slides from Google I/O 2011: Google I/O 2011 , we can find several controls from the Honeycomb platform. On the bottom of the page there is a switch on/off control, but I'm not able to find it at all on the 3.0 Android…
2
votes
2 answers

getResourceId finds no ID in custom control

I'm trying to create a control (a panel that expands and contracts when a header is clicked), and I found some code online. In the constructor, I have TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.MyControl); ... int headerId…
Turner Hayes
  • 1,844
  • 4
  • 24
  • 38
2
votes
2 answers

StateListDrawable with LayerDrawable created programatically not working on Android 4.0+

I am trying to create an option group with coloured squares for the user to choose one. It is working on a 3.2 device and looking like in this picture: The code is something like: for (int i = 0; i < COLORS.length; i++) { CheckBox box = new…
1
vote
4 answers

Implement gallery-like slider control

Can't find how to implement such control and don't know even it's name: Every 1, 2 and 3 elements are the same custom controls (let name them items). Items should be slideable in both directions by finger and (will be great) also by tapping…
Sergey Metlov
  • 25,747
  • 28
  • 93
  • 153
1
vote
0 answers

checkbox customize center align

I want to use checkbox in my android app. But because I want no text beside it so the checkbox square is aligned left. after some search and some changes I faced some thing strange: one centered square whose over lapping another left aligned square,…
1
vote
3 answers

Which control to use to make a Google Play style horizontal scroll

I am trying to make a horizontal scrolling list much like one we can find in the Google Play app. I have made the fragment (100dp x 150dp), and the adapter, but am struggling to find an element that will work. The fragment looks like this : It is…
1
vote
3 answers

Android custom reusable controls?

I have a few activities in an app I'm writing that I want to put a form on the page. It's the same form for all the activities that does the same except for different title and text. Instead of rewriting the controls and the logic for each…
developer82
  • 13,237
  • 21
  • 88
  • 153
1
vote
1 answer

Which control would be a better fit to this problem?

Requirement: I have a GridView of thumbnails; the user can click on a thumbnail to view the larger, full sized image. This "full sized" image is to be fetched from a remote server. When the user is viewing a particular image he should be able to…
Samuh
  • 36,316
  • 26
  • 109
  • 116
1
2