I'm trying to develop and Android app which is based on the UI of this iOS app. I'd like to reproduce two things:
As you can see, there are three buttons on the bottom of the app and by clicking on them you can move between the screens without refreshing the whole activity. Are there similar views I can use in Android to reproduce it?
On the activity of the screen, there is a list of film. I would thinking to reproduce it by creating a listview. Do you are there better alternatives?
You could use a BottomNavigationView to recreate this style of navigation. You can add the BottomNavigationView to your Activity and then use individual Fragments for the inner views i.e. Home, Search and More.
ListView would be alright for this or you could use a RecyclerView with a LinearLayoutManager. RecyclerView is a bit more flexible than ListView as you could change the LayoutManager for a GridLayoutManager if you wanted on larger devices.
I'd also recommend checking out https://material.io/components/ where you can see what sort of design guidance Google give for their Material design system.
Related
As the title states, how exactly can I use ViewPager to display a list of apps. Right now I'm using a GridView to display the list of apps on my device and it runs the app upon selection. However I wish to get a similar effect from launchers in the Play Store, the app drawer is split into different views and displays a set number of apps on one page. And when you swipe it goes to the second page and displays more apps.
How can I do this? At the moment I just have a simple GridView which can be scrolled up and down,
I have looked all around the internet and i have gotten no answers, I've taken a look at the aosp launchers src on github but it's too complicated to understand.
Thank to whoever answers my question.
You can use Jake Wharton's Android-ViewPagerIndicator in ViewPager to display your content. You can also try astutez's PagerSlidingTabStrip, it will me more suitable for your requirements. Implementation is very simple, you can also find the sample in the repository.
I am trying to use the sliding drawer to change the Main page's fragment.
What is happening is, I see the drawer closes and than half - 1 second and than the fragment starts changing.
I think this behavior is too slow and from the other Apps, I still during the drawer closes, the fragment has already changed and it looks much better.
Any idea on how this can be accomplished??
Depending on where your at with the application, you may want to take a look at androids navigation drawer. There is a straight forward tutorial here. https://developer.android.com/training/implementing-navigation/nav-drawer.html
Also, if your using android studio, you can create a new project and specify a navigation drawer for the navigation and it will autocreate one for you.
If your having speed issues when switching fragments, you will want to provide the code here so we can review it. Also, take a look to see if your doing any resource intensive calls when creating the fragment. That could slow down the process some.
Android Newbie here! I spent all yesterday trying to implement a simple dialog in my android app. I realised there is no easy way out. I mean all i just wanted to show to user is a simple choice between importing a video into the app from the gallery or recording a live video. My Parent UI is already consisting of two fragments in a split-pane style(Details on the left, gridview on the right). Now i want to show the options for importing a video as a dialog. Turns out i have to create another fragment(DialogFragment), give the fragment a UI(ListView), create UI for the list items, create adapters for my list, override getView method for my adapter with custom logic. is there no shortcut to this? While this might make me sound lazy (which i'm not btw cos i love coding), what if i want to create 4 additional dialogs, do i have to do this everytime? is there no easy way out?
btw I'm targeting SDK 11 to 19 devices.
Any help will be very much appreciated.
Have you had a look at the AlertDialog.Builder?
You could use this to build your dialog and then set your click handlers on setPositiveButton and setNegativeButton methods if you only want two options.
It was added at API level 1.
I would like to implement in my android app that I'm developing with the Android studio ide.
The swipe between the different tabs (fragment). I tried searching online and on StackOverflow but I could not quite understand.
My action bar is the classic one that works with Android above 3.0
If you can give me some advice or examples of aid etc. I shall be very grateful.
With this I thank you.
I suppose the Android ViewPager is what you are looking for:
http://developer.android.com/reference/android/support/v4/view/ViewPager.html
Here is a nice tutorial on how to implement it:
http://developer.android.com/training/animation/screen-slide.html
The basic idea is that you have multiple Fragments, each representing
a different Screen. The ViewPager enables the user to swipe between
the different Fragments and display different content.
Also take a look at this question:
How to implement a ViewPager with different Fragments / Layouts
And how to include the Support-Library: http://developer.android.com/tools/support-library/setup.html
I am currently working on an Android theme aka launcher. I have my first page ready to go but my question is how can I add additional screens so the user can swipe to them. I tried googling but with no luck. Any help is greatly appreciated.
This is greatly dependent on the structure of your views. Have you used Fragments?
If you've used Fragments for your current view, you can create Fragments for the other ones and simply put them all in a ViewPager.
I'd recommend checking out this training session.