CopyPastor

Detecting plagiarism made easy.

Score: 1.7660441994667053; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2018-04-05
by Nikunj Paradva

Original Post

Original - Posted on 2017-09-28
by Mohammad Hosein Heidari



            
Present in both answers; Present only in the new answer; Present only in the old answer;

**For Selected Tab Icon and Text Color Change**
`res/color/bottom_nav_color.xml`:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="@color/your_color" /> <item android:state_checked="false" android:color="@color/your_color"/> </selector>
and in your BottomNavigationView set `app:itemTextColor` and `app:itemIconTint` values to `@color/bottom_nav_color`
<android.support.design.widget.BottomNavigationView android:id="@+id/navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@color/actionBarColor" app:menu="@menu/my_navigation_items" app:itemTextColor="@color/bottom_nav_color" app:itemIconTint="@color/bottom_nav_color"/>
**For Default Item Selected Color**
BottomNavigationView bottomNavigationView; bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottomNavigationView); bottomNavigationView.setOnNavigationItemSelectedListener(myNavigationItemListener); bottomNavigationView.setSelectedItemId(R.id.my_menu_item_id);
create a color directory in res and create your xml file for customize your bottom navigation items
res/color/bottom_nav_color.xml:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="@color/your_color" /> <item android:state_checked="false" android:color="@color/your_color"/> </selector>
and in your BottomNavigationView set app:itemTextColor and app:itemIconTint values to @color/bottom_nav_color
<android.support.design.widget.BottomNavigationView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@color/actionBarColor" app:menu="@menu/my_navigation_items" app:itemTextColor="@color/bottom_nav_color" app:itemIconTint="@color/bottom_nav_color"/>


        
Present in both answers; Present only in the new answer; Present only in the old answer;