Android Sliding Drawer slow in changing fragment - java

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.

Related

Ads similar to Duolingo pop up ads in Android Studio - Java

I am wanting my pop up ads to have a similar style to the Duolingo pop up ads. But I am not sure how to do it and can't seem to find any resources on this.
Would this be a separate activity with a smart banner? Or is there a way to customise ad mobs interstitial ads?
I haven't found any resources so far and thinking if I use smart banners in a seperate activity it would be complicated to handle as I will also be working with fragments and passing data between the 2 already existing activities / fragments. Also concerned smart banners will have a much lower ECPM than interstitial.
You could use a full-screen dialog fragment. This post completely explains the introduction. For the central box, use MaterialCardView and MaterialButton, or another container with a custom background.

UI parallelism between Swift and Android

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.

How to layout UI app android like facebook?

I saw some same topic here but can not find the anwser so I create my ask question.
I am a newbie in android and I am learning to build a layout by my self, I see facebook app and wonder how they layout UI with friend list behind main content. And when you click toggle friends main content will slide to left side and friends list show up.I try to use navigation drawer and viewpager but can not achive. I wrong something or it must use by other technique. Anyone can give some idea how to do that.
After two days, finally i found the answer by use a great this SlidingMenu.
https://github.com/jfeinstein10/SlidingMenu

how to support multiple screens in a Android theme

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.

Android pattern for activity "flows"

I'm developing an android app that has a bunch of screens (activities) that are supposed to have "continue" and "back" buttons at the top. Can you tell me the right pattern for implementing this? I've seen some iPhone apps that have this but Android apps usually don't (I think partly because the back button is part of the phone).
I found a post online about an Activity class that has "sub activities" which kind of seems like what I want to do, but I'm wondering if there's a simpler solution or pattern for creating flows like this (in which several activities are linked with continue/back buttons).
You answered part of it yourself. There shouldn't generally be a software back button because android has a hardware back button. As for a continue button, that's extremely context dependant so it would probably be written in software based on the context.
No that doesn't sound like what you want. You're probably thinking of an activity group and from the very vague description of your design, you don't want those. There's no "simpler" solution or pattern to create flows like this because this is the exact default android behaviour.
Just start a new activity in your "continue" button, and the back button will finish that activity.
I'm developing an android app that has a bunch of screens (activities) that are supposed to have "continue" and "back" buttons at the top.
If you want to implement a wizard, use buttons at the bottom and do it as a single activity, perhaps using a ViewFlipper for the changing contents.
If this is not logically a wizard, just allow the BACK button to handle "back", and tapping on something meaningful to go forward, as a set of regular activities, like a regular Android application would.
In other words, please follow platform navigation conventions.
can you just open a new activity as per usual android development and make the back button call finish() you can set your theme to make the activity animate out like the iphone when finish is called.

Categories

Resources