android-bottomnav

Load data only once when using BottomNavigationView

早过忘川 提交于 2019-12-11 10:32:21
问题 I have a BottomNavigationView displaying Fragments , in my first fragment I'm using volley to fetch JSON data and populate it in a RecyclerView like below: private void loadRecyclerViewData() { StringRequest stringRequest = new StringRequest(Request.Method.GET, URL_DATA, new Response.Listener<String>() { @Override public void onResponse(String s) { bar.setVisibility(View.GONE); try { JSONArray array = new JSONArray(s); for (int i = 0; i < array.length(); i++) { JSONObject o = array

Android bottom navigation bar customization

白昼怎懂夜的黑 提交于 2019-12-04 14:02:55
问题 I have successfully implementing simple bottom bar and it looks like picture 1. But I wanted to customize it further so it can looks like the bottom bar in Youtube's android apps, which when you clicked in one of the item, it will spread shadowing effect. My current bottom bar: Youtube's bottom bar I would also like to customize it to look like the one in the official site with some animation when items are clicked. Any snippet or tutorial links would be appreciated. Thanks 回答1: try this

How to change activity on bottom navigation button click?

雨燕双飞 提交于 2019-11-30 00:23:07
I want to use bottom navigation bar in my existing android app but the problem is all screen are activity ,is it possible to load activity without hiding the bottom navigation bar. example: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.widget.NestedScrollView android:id="@+id/myScrollingContent" android:layout_width="match_parent"

How to create a BottomBar as StickyBottomCaptureLayout in camera2 Android api?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 08:30:15
Context: In the android-7.1.1_r12 api, the android.hardware.camera2 uses a StickyBottomCaptureLayout as a "BottomBar" to display the action buttons (as switch-camera, shutter and recent picture buttons). Whatever the device orientation, this StickyBottomCaptureLayout is displayed always above/near the system bar (which has back, home and other apps buttons). For example, this is what it looks when the rotation degree is 0 or 180 : And, by orienting the device and get a rotation degree as 90 or 270 , the StickyBottomCaptureLayout is now near the system bar: Usually, this above screenshot should

How to highlight the item when pressed using BottomNavigationView between activities?

老子叫甜甜 提交于 2019-11-29 03:14:41
I have added Bottom Navigation View for my app but I need the Bottom Navigation View between activities instead of fragment so I have added this code to Java for all my 3 activities. When I select Second or Third in my phone all things are correct but the problem is the highlight goes to the First item. I need to highlight the item I press. I have used fragment and it works perfectly but I am still beginner for using fragment so I am using activities. The first activity code is: BottomNavigationView mBottomNavigation; mBottomNavigation =(BottomNavigationView) findViewById(R.id.BottomNavigator)

How to create a BottomBar as StickyBottomCaptureLayout in camera2 Android api?

大城市里の小女人 提交于 2019-11-28 02:04:16
问题 Context: In the android-7.1.1_r12 api, the android.hardware.camera2 uses a StickyBottomCaptureLayout as a "BottomBar" to display the action buttons (as switch-camera, shutter and recent picture buttons). Whatever the device orientation, this StickyBottomCaptureLayout is displayed always above/near the system bar (which has back, home and other apps buttons). For example, this is what it looks when the rotation degree is 0 or 180 : And, by orienting the device and get a rotation degree as 90

Android Bottom Navigation Bar with drop shadow

三世轮回 提交于 2019-11-27 21:20:54
I'm implementing Bottom Navigation Bar in Android app using Google's support design library v25.1.0 . Is there any way to add drop shadow effect, same as current Android native Google Photos app? You can draw your own shadow just above the bottom bar using simple View and its background: <View android:layout_width="match_parent" android:layout_height="4dp" android:layout_above="@id/bottom_bar" android:background="@drawable/shadow"/> drawable/shadow.xml: <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#1F000000" android:endColor="@android:color

How to remove icon animation for bottom navigation view in android

北战南征 提交于 2019-11-27 18:23:15
I have implemented Bottom Navigation View from Design Support Library 25 in my project. I have 5 icons in the view. whenever an icon is selected it's having some animation. But when 3 or fewer icons is not showing any animations. I want to remove that animation and need only some color change for the icon. How can I achieve this? Done enough googling, but couldn't find the solution. Please help. Thanks. Nabeel K got answer from this thread . To remove animation or shift mode. Implementation of BottomNavigationView has condition: when there is more than 3 items then use shift mode. Create

How to highlight the item when pressed using BottomNavigationView between activities?

流过昼夜 提交于 2019-11-27 17:42:50
问题 I have added Bottom Navigation View for my app but I need the Bottom Navigation View between activities instead of fragment so I have added this code to Java for all my 3 activities. When I select Second or Third in my phone all things are correct but the problem is the highlight goes to the First item. I need to highlight the item I press. I have used fragment and it works perfectly but I am still beginner for using fragment so I am using activities. The first activity code is:

How to make bottom navigation show menu items with icon and text except center item menu show only icon? [closed]

徘徊边缘 提交于 2019-11-27 11:51:35
I want to create bottom navigation bar show menu items icon and text except center item. eg. i have attached image Try below code: XML file: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" android:background="@color