I would like to create a layout similar to what the default alarmclock in android has.
What i would like to create is something like this:
Android Alarm Clock
What is beeing used? Is it a ListView, TableLayout or what is it?
Also how do i create those toggle buttons to the left?
Answering my own question.
It is a listview with custom list items. Each listitem is built up by several other views mostly linear views.
More details in the source code.
Related
I have been reading ListView is Scrollable and ScrollView is scrollable and you don't really want to put them together. Also, ListView is legacy (which I think means deprecated) in Android Studio 4. I am a complete newb so if I ask this question wrong, it's because I don't yet have enough knowledge to ask the right question.
I would like to do a list of contacts that is scrollable so I would think I want a ScrollView + some kind of list but that piece I am not sure of. What should I combine ScrollView with? Or is this the wrong question? My end goal is a simple scrollable list of contacts and a user can choose a single contact.
You can try to use RecyclerView. I think this is the best option when You load many items, in Your example contacts. RecyclerView is faster than a simple scroll view, it looks better, and has many many customization options. Useful docs:
Create a List with RecyclerView
RecyclerView
Good video explanation with an example:
If You use Java
If You use Kotlin
I am new to Xamarin IOS and I have a problem with creating nested layouts in IOS as like in Android(some text controls and a list view) . I added a tableview but not sure how to add some text and image controls in a view and add the tableview below the text and image controls. Also I am using ViewPager in Android and is there an equivalent control that I can use in IOS?
Yes, you should use UIScrollView and enable paggin there. The only issue that you need always to set the ContentSize for it, to make it scroll properly. So you should set the common Size of inner content.
You should check out monotouch.dialog for rapid tableview development. Once you get the hang of it, it makes creating tables a lot easier.
I am new to android applications. I want to create an application that should have a spinner in the beginning and based on the item selected in the spinner the lower design/layout/values changes. Basically there can be two layouts one in the upper half with spinners and the lower half will vary based on the spinner value.
How can I achieve this?
Use Fragments to achieve this thing. Have a look at below tutorial this will help you.
http://www.vogella.com/articles/AndroidFragments/article.html
Can I create custom horizontal menu in android? I mean something like this:
I want to be able select level and drag level by finger.
What methods should i use?
LinearLayout with android.orientation="horizontal", or something else
Android provides a HorizontalScrollView for this.
For more information visit the Developers guidelines
I am kind of wondering what the recommended method is for a customized UI. I have about 5 screens, which will share some of the same elements. One is a topbar, kind of like the navigationbar but different. It has the title on the left, no back buttons, a background image and a logo on the right. The other is a menu at the bottom containing and UIImageView for the bar, 3 UIButtons a the moment opening 2 different screens and one opens the Camera. I want to reuse the top bar and bottom bar on all 5 screens. Sort of like one would use a UserControl on ASP.NET.
Currently I have created 5 ViewControllers, which gives me 5 XIB files that I have to put the same elements on and I have to hook up the same events. I would want to create 2 elements (top and bottom bar) which I can reuse across all screens. Or is there a simpler solution to all of this like e.g. 1 screen pushing different middle parts into it or something like that? Quite the beginner at MonoTouch for that matter, so I'd love to know what the way-to-go for something like this is?
If you are not able to customise / reuse the standard UINavigationController etc, you could -
Create a custom UIView in Xamarin / Monotouch for each of your reusable elements, then insert them into each ViewController (programmatically is probably easiest) as required. This would give some code reuse and is akin to the UserControl example you mentioned.
Alternatively for IOS5+ you could create a Custom ViewController Container which has all the common parts in one place and have a single container UIView which you would then switch the rest of your Content ViewControllers as you need to.
I have actually just finished a github example of this which may help -
https://github.com/wickedw/ViewControllerContainer