Change look and feel of Spinner View - android

I need to change the look and feel of the Spinner View, so the little triangle in the lower right part is a bit bigger, and with a circular shape in his "back".
I've been looking but all the tutorials refer to the custom adapter part of customizing a Spinner.
Anybody knows some tutorial to look at to change the appearance of a View?
Thank you.

There are three ways to build a custom view:
1- By extending the view
2- Compound many views
3- Create a totally new one
Here an example: http://developer.android.com/training/custom-views/create-view.html

Related

What's the best combination of layouts to use to create this effect?

I am trying to create a program with some kind of list which is dropped down when you are clicking in the desired category and reveal some items in there.
I am new to layouts and XML editing, so I would love to have a tip where to start with.
I tried RelativeLayout but then I am stacked.
I don't want you to write the code for me, just some suggestions for what Layout is better to use and I will do my research for that. Thanks.
Use ExpandableListView class, with a custom view for the children :-)

How to design this in xml?

I have absolutely no idea on how to implement this design as listview in android. Can anyonee help me or suggest me? I just need to know how to implement that blue arrow part.
If I would have to implement this, I would create this blue arrows as PNG images, because it looks like you just have a certain amount of them. Then I would add the images to the right of the list element.
This link could help for my described solution:
http://www.learn2crack.com/2013/10/android-custom-listview-images-text-example.html
More Detail: Like Bubu said, the picture need to be in a ImageView. Use GIMP for the creation of Icons or ImageButtons. That's how I do it, and GIMP helps me a lot for this purpose (Resizing, Pasting, Cutting etc.).
Add an ImageView in your ListView item layout and set this ImageView in your ListView adapter in terms of the kind of item. You can set the ImageView background with the blue arrow in your xml file and the ImageView source with the correct drawable in your adapter.

Android, custom component design

In my application I need to have something like image below. I have experience of creating custom components and I know how to do it. However, I have no idea how to create this kind of component. Do I need to do something like when we are designing custom rating bar?
Anyway, their so many way you can achieve this.
One way i am seeing using radio group and radio button, vertical lines and text view you can easily achieve this. Put everything inside a layout of your choice and then just inflate the layout where ever you need. After that you just need to set the radio button like this radio1.setChecked(true).This is a simple solution but may not a be a optimal one.
Alternatively you can create a custom view by extending view class or any of its subclass, whatever you feel suitable for your work then override its onDraw method do the entire thing manually.

What is the approach I should take to make a Kakuro grid?

I'm creating a Kakuro game for Android and it mainly consists of a large grid which contains only black and white squares according to a pattern. I have decided to use a custom class extended from Button to represent black and white squares.
But the problem is, I can't figure out what to use and/or extend to represent the square-containing (Button-containing) grid. It should have the following behavior:
Should be able to house Buttons along both x- and y-axes.
Should be scrollable in both ways as the grid will most definitely exceed the device's screen size.
Should not be too hard on the memory footprint.
So after some thinking, I have decided to create a custom class that extends View. But I don't know exactly which methods to override to obtain the behavior I want.
So can anyone please tell me which methods I should override to obtain the behavior I need? (The behavior is somewhat similar to that of Minesweeper).
Or is there any other easier/faster method I can use?
Thanks in advance!
if it is a grid you want, I recommend the GridView.
A view that shows items in two-dimensional scrolling grid. The items
in the grid come from the ListAdapter associated with this view.
GridView tutorial: http://developer.android.com/resources/tutorials/views/hello-gridview.html
Extending the GridView seems more suitable for your need: http://developer.android.com/resources/tutorials/views/hello-gridview.html

How can I make a listview with more than a title?

I would like to have a special listview with a title, couple of sub-categories, and a picture. The picture below is a rough idea of how I would like to lay it out. I am very new to android so keep in mind that details really helps me. Thank you in advance.
You can create an xml layout that is used for each ListView item. If you haven't yet, read through Common Layout Objects for an introduction to the different layout types. There are also a "Hello layout" tutorial for each layout type, linked from that page.
In this case, you could use a horizontal LinearLayout with a vertical LinearLayout and an ImageView inside of it.
To bind your objects to the views within your ListView item, use a SimpleAdapter. You can find a number of tutorials on SimpleAdapters if you search around, for example.

Categories

Resources