I am Stuck at place where i want to developer custom layout in android, please Suggest that how can i achieve layout like this which technology should i use , I want to develop application like Booking of Seats in bus or Some thing like that Please Guide which way i go like on XML,openGL , Canvas Please guide me
If you need to interact (handle click or touch) with every view marked with a number I would strongly recommend using XML. Using OpenGL or Canvas would add plenty of time to achieve a good interaction. Creating your layout in XML will be the hardest part, but after that you'll be able to interact with every view setting regular View.OnClickListener or TouchListener.
Hope this suggestion helps.
Related
I'm sorry. I'm being very vague on my question, but I'm not sure what to search to accomplish the layout I want to. Here's a sketch of what I'm wanting to do:
Basically, what I'm trying to do is recreate a standard booking app, and I'd like to know how can I recreate the part showing each room. I'd like some help how to create the layout to show 1 room and how to repeat that layout multiple times.
Use ListView or RecyclerView
Here is an example
https://uniqsofts.com/android-tutorials/android-listview-example
At the top there is the favorites/styles/all channels
i don't know what that widget/control is i need to know what it is
i am certain i saw it before i just can't seem to find it again.
then there is a listview which is easy to implement no help needed there
then the same control again, i need to know how to build it.
it looks like a native Android control, i know how i can make one just like it using image buttons but i am sure i am missing something.
P.S. this is an image from sky.fm app on android
EDIT: I Do no need help with the ListView i already did that
What i do need help with is how to make the "favorites/styles/all channels" buttons if there is a way to do natively.
If there isn't a way to do natively, and you are sure just say there isn't a way to do natively ( that would be a good answer )
the perfect answer would be a working code, but i am not lazy i am already implementing the code my self
There's no native control for this. It's probably a Button or maybe ToggleButton. You could create a background xml with different states for selected true or false. And when you click the button toggle the selected state.
Top might be a custom tab layout, or just a bunch of buttons with custom styling.
Main part looks like a listview with complex row views.
Bottom almost definately is a bunch of buttons.
You can implement it using ClickableListAdapter.There is also tab implementation.try it.
Just make it using image buttons and put filters in your ListView, or create your own filter form scratch !
I have a need to create a circular dial/rotary style component for use in an application. It's essentially a circular menu that allows users to select from the items that are ringed around it, and then they can click the button in the center to activate the selected item. However, I've never created a custom UIView of this type, and don't really know where to begin. Can anyone give me any pointers as to how I would draw the view and then rotate it as the user drags their finger? I obviously know how to intercept touch events, etc. but I'm not sure how to actually go about manipulating the UI appropriately. Any tips or pointers would be great!
I don't know if you've already found a solution to this, but here is a nice overview of how to get started:
http://shahabhameed.blogspot.com/2011/05/custom-views-in-android.html
For you, I think you can extend an existing View, that View being the SeekBar. You can take the standard SeekBar and draw it in a circle.
Finally, here is a source code that does the rotation with a volume knob. It is its own project though, so you have to do some work to use it in your own app.
http://mindtherobot.com/blog/534/android-ui-making-an-analog-rotary-knob/
Good Luck!
I have a neat library to do this. It is extremely stable and well maintained. https://bitbucket.org/warwick/hgdialrepo
Heres a youtube demo: https://youtu.be/h_7VxrZ2W-g
This library comes with a demo app with source code and the demo app actually uses a dial as a menu, So I think this should be the perfect solution for you.
I would like to allow user to sign on a screen with stylus like UPS or Credit Card terminal in store.
Is there control/api I can use in my program to convert this to image?
Use Canvas, track finger movements and generate a bitmap. You will probably want to create a custom View to handle this things.
You should read up on Creating custom components and come back with more specific questions.
AFAIK there is no such control. But you can implement yours easily. Take a look at this example.
I'm searching for exactly the same thing.
I tried to base my work on FingerPaint Example
I created a layout with a View, but I don't know how I can join the view in my layout to the class used in finger paint example.
I'm trying to achieve a custom controller containing of various buttons in different shapes. I'm wondering how I can achieve this with Android.
The result should look similar like this, where every color is a different button.
I suppose I have to subclass View so please don't write that as an answer ;-) Please give some methodical steps what's needs to be implemented, like drawing, sensing touches, etc or maybe point me to some examples (if exist).
Thanks
if you intend to draw this dynamically you would have to extend View and override onDraw, you can implement onTouchListeners, etc to detect when and where people are touching it.
I found this document explaining everything in detail and having links pointing to related topics.