How would I draw this shape in Android using xml? - android

I'm porting one of my iOS apps over to Android (which I'm pretty new to), and I was wondering how I would draw this shape in Android using XML:
I want to recreate the shape (the white object) at the bottom of a tableView. The image attached is a screenshot of the bottom of a UITableView.
Any help would be greatly appreciated if you need any more info just let me know.
Thanks
EDIT:
Sorry I wasn't totally clear, I'm actually trying to recreate the slight arch at the bottom of the table. Since it's so slight, you may not be able to see it with a quick glance.

It seams to me that you want to "lift" your table up a little bit. If so, you have to implement this attribute to your tableView:
android:elevation="2dp"
or in java:
tableview.setElevation(2);

My opinion when reading this question: Stop trying to make your android apps look like iOS apps !!!
If you still want to do it.
Just have the background color for your activity to that color and set the layout_margin to either 2 or 4.
It should give you your desired effect.

Related

Apply a gradient to a listview in android

I'm trying to use a listview in my application with a gradient from the bottom.
I do not want to use the gradient in the background, I like to use it in the listview.
To try to explain better, I attached a picture of what I want.
The background will show images that will change.
I searched a lot and made ​​several tests, but without success.
I appreciate any help.
Thanks and regards
Android has something built in for that. It is called fading edge. The two XML properties are android:fadingEdgeLength and android:requiresFadingEdge. If you were hoping to have the image gradient change, I don't think they are dynamic.

Android : how to make View Flow with bottom shadow like iphone

Going straight forward..
1.what i achieved so far (thanks to pakerfeldt- https://github.com/pakerfeldt/android-viewflow)
2.what i need actually
so almost done..but you can see bottom shadow functionality (at viewflow) in iphone screen (and it can pull down and can see entire image). so does anyone achieved something similar in android ?
any other library for reference ?
Thanks in advance. answer will be appreciated.
Thanks.

Suggestions for android layout

I currently got this complex screen to implement the XML code.
I suppose to build with the tablelayout, but i still have no idea how to place the item on the shelf and the wooden background behind that. Could anyone hint me some ways ? Thanks
Set the bitmap as your activity's background drawable. From there, you've got several possibilities. Two that should work are
1) Place transparent Button's on the activity, using an AbsoluteLayout.
2) A couple of people have coded solutions similar to the HTML image map construct, and posted them in public fora. Google "imagemap android" and borrow.

Animating Picture Transitions

I'm starting out with Android development, and I'm kind of stuck. Basically, I have a layout with dynamically added ImageViews, and I want to have the ImageViews change their image every once in a while. However, I'd like to add some sort of transition or changing animation, like a flip or a flash.
I don't really know where to even start to look for an answer to this question. Any help is greatly appreciated.
The android framework has this totally covered:
http://developer.android.com/guide/topics/graphics/view-animation.html
Basically, you are looking to define "tween" animations between your drawables (imageviews). After you define your animations you can even define a set of drawables to show one after the other using frame-animation.
Check out the following for all the gory details:
http://developer.android.com/guide/topics/resources/animation-resource.html

How can I suggest a feature to the Google Android team?

I have been looking for a easy way to add borders to custom made Views (Compounds or whatever), and the only answer I found was that there is no built-in support for that. Instead there are suggestions that you should add Views on top/below the View you want borders on and a bunch of others really messy ways to get borders.
Coming from the .NET-environment that is pretty brutal to have to do ugly workaround and "hacks" to get something as simple as borders.
Thus, I want to suggest that feature to the Android team. I'm not sure how they can have missed it, but it is surely missed =)
So, is there any official way to suggest a feature in the SDK/framework? I have looked around a bit, but can't comment on their blogs, no e-mail addresses as far as I can see.
Put your suggestion at google code.
You can easily create a Drawable subclass that draws whatever border you want and reports the padding for that border, and sets it as the background of the view you want to have drawn with a border. Or set it on a FrameLayout to have the border placed around the other views inside of the frame.
sorry, 8 years later. At the link below there's a Feedback section with a link to Feature Requests
https://source.android.com/source/community.html

Categories

Resources