I saw in native base of react native have great component is: TouchableOpacity, so i have one question in Android, how can i custom a button or any view like ImageView, TextView... when i selected it look like TouchableOpacity in Android? Thanks
To achieve an almost similar result, try using statelist drawables and animators
Related
I am looking for a custom component to design a circular remote control view like the image below with different button and background color.
Each button should be touchable with proper press effect. I did find a useful library with this I am able to create somewhat similar design but still there are lots of improvement required like Press effect/ Inner and outer circle padding radius etc. Please help me to find the better option for this.
I think tihs is your answer.
You can download here.
https://code.google.com/p/radial-menu-widget/
You could make your own class extending view. You will then be able to override onDraw() and draw whatever you want.
You could also use default android Button with a custom xml selector defined with a different image ressource for pressed/not pressed states.
i'm new to android programming, i've styled buttons and textfield in web application using stylesheet, how can we do that in andoid, can anyone please tell me how to create a edittext like as shown below image in android.
how can we style a edittext in android.
I suggest to use a Image as background for EditText. I don't believe this can be done in XML.
I create Application which uses ListFragment.
so, I want to scroll to top when touch StatusBar, like UItableView in iOS.
please help.
You can set a OnClickListener to the StatusBar and use the scrollTo/smoothScrollTo methods of the listview.
Something like this
getListView().smoothScrollToPosition(0);
should help.
I have gridView which has lot of images and on clicking the edit button, I want the images to wobble just like : how to create iphone's wobbling icon effect?. Appreciate any pointers to solve this issue.
You can start off by modeling the wobble effect as a combination of Animations that Android provides. You can then extend an ImageView and use an AnimationSet of this combination of Animations.
You can create an xml that defines how the ImageView will be animated, load the animation in code referencing this xml and then apply it. A brief documentation here.
HI,
I'm trying to achieve a custom buttons . I'm wondering how I can achieve this with Android.
The result should look similar like this,
how I can make special shapes adjacent the problem it is because the image of each button must always be rectangle.
Thanks.
You can create custom backgrounds (shapes, colors, etc..) using xml drawables.
You should check out the documentation and the samples, like this one: