I am having animation problem while rendering Bottom Navigation View dynamically in Android.
I am getting list of icons and label from server and rendering it programatically.
2 Problems :
Icons are coming from right to left
On slower phones, 2nd icon renders and then rest of the icon appears. For example, in my case, More tab comes first at right most and then other tab appears after fraction of seconds.
Requirement :
Remove right to left animation
All icons should render at the same time.
Any solutions to resolve the same?
Just call server api call before initiating the view in android or populate all values before showing the bar in UI or you can use its visibility toggle just give it visible invisible in XML or change its visibility to
View.VISIBLE after populating whole data of server in it..
May be it will be helpful for you !!
Related
I have a TabbedPage with four tabs in Xamarin.Forms. The four tab pages each inherit from a common ContentPage with an AbsoluteLayout. When I push to this TabbedPage on Android, the new navigation bar momentarily appears about one-third of the way down the screen then rapidly animates to its proper position at the top of the screen, before other screen elements are displayed. It's very distracting, and even happens (without any text) if I do not set a title at all. Does not happen on iPhone.
How can I prevent this animation?
Edit: Here is a video showing the problem at 0:02, 0:24 and 0:40 : https://drive.google.com/drive/folders/1rHxS_rcVEr8sPC0yujcZf34XvLJ7yJ2K?usp=sharing
Well, the navbar animates from bottom to top of the screen and it stopped midway because I was doing too much on the UI thread in OnAppearing.
Adding a 200ms delay in OnAppearing was one way to avoid it.
I try to make an app using one activity multiple fragments pattern. I handle navigation with Navigation architecture component using a bottom navigation view. In one of the fragment I have a Recyclerview which displays a list of custom cards. On item click it navigates to another fragment where I need to hide the bottom navigation view.
The problem appears when I navigate back and set the bottom navigation view visible again. The bar seems to appear in two steps giving the feeling of lag. (first time appears just 60% of the bottom navigation view).
The behavior seems to be related with the status bar. When I change the theme to full screen or I set windowTranslucentStatus=true, everything behaves okay. In addition, first time the nav bar seems to be with exactly 24dp smaller, that is the dimension of status bar.
Have you any idea what can I do?
PS. I'm new on stackoverflow and this is my first question. I'm glad to join this wonderful community.
Delay is one way to go, but I wouldn't suggest that.
I am assuming that the your navigation view is rendered before the entire activity is rendered, which is causing it to be rendered again after the UI is rendered. Why don't you try setting the visibility after the UI is rendered, like here
I am working on an Android application and have to code up the following design for one of the screens:
(Ignore the yellow stuff, I have just masked the Logo and the App-specific information for now)
My question is: How do I design this particular type of screen? The top pane is akin to an ActionBar in Android. However, when any button on the top pane is hit, this custom "popup" having a rectangular form with a small arrow on top pointing towards the button is display and does not interrupt the current/main activity.
I have looked around, but still dont understand how to accomplish this.
Any thoughts? Thanks!
You can use the native Action Bar along with the icons.
The only problem is if you want to show them all at once.
Some icons may be hidden depending on the size of the phone.
As for the custom pop-up, the toast feature is available to do that.
It is quite easy to adjust the position of toasts and customise toasts :
Customisation of toasts: http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView
Changing postion of toasts: How to change position of Toast in Android?
I'm using a GridView that fills the whole of my main activity. To make it look nicer I'm using a transparent action bar. I'm using these values on my grid view so that the content doesn't start in the action bar but still scrolls through it:
android:paddingTop="?android:attr/actionBarSize"
android:clipToPadding="false"
The only problem is once the bottom of the row enters the action bar it disappears. I'm assuming because Android thinks it is no longer visible so it's safe to remove.
I'd like a way for it to not disappear, even past the status bar as I'll probably make that transparent on KitKat too. Either a different approach or a simple solution would be great.
Turns out this was a problem with the TwoWayGridView library I was using (https://github.com/jess-anders/two-way-gridview). Switched back to a normal GridView and it works fine.
I'm experimenting for the first time with Android's Navigation Drawer. I think it is a very elegant way to provide an application menu. However, showing my prototype to some friends, it seems that it is not quit intuitive to search for a menu i) on the top left corner respectively ii) on the left side of the screen.
To provide a "user hint" for case i), I added a custom image by creating an ActionBarDrawerToggle. This results in following design of the title bar (the little arrow is the cutom image, while the red star is the application icon):
Now while developping, I thought this is quite obvious, but apparantly I'm wrong :). So as a second idea, to support a user to find option ii) described below, I tried to figure out how to add a further image at a specific place, which I want to explain with following image:
Don't look at the design itself in the first place, but following: the image must be placed outside of the "view bounds" (when the navigation menu is hidden), and also exceed the navigation panel itself on the right side (always). Is this in any way possible without customize the entire navigation panel? I really wonder why I can't find much about this idea, since I think it is a very nice option to provide for the user (as long as the arrow don't disturbs the application usage)
Although I haven't actually tested it with Android's Navigation Drawer,
did you try putting an imageview in your activity's layout? The image would be placed in the middle vertically and on parent left horizontally. I believe this would work (i.e. the image will get pushed when you open the drawer. As an improvement you could also change the image itself in the drawer's callbacks, so that you have an arrow pointing right when the drawer is closed and an arrow pointing left when the drawer is open.
Hope it helps.