<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: benreturns</title>
    <description>The latest articles on DEV Community by benreturns (@benreturns).</description>
    <link>https://dev.to/benreturns</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1075897%2F3529ac1e-7164-4abe-8aa9-cd90897b3620.png</url>
      <title>DEV Community: benreturns</title>
      <link>https://dev.to/benreturns</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/benreturns"/>
    <language>en</language>
    <item>
      <title>Customize navigation bar in Android Studio</title>
      <dc:creator>benreturns</dc:creator>
      <pubDate>Wed, 03 May 2023 07:50:40 +0000</pubDate>
      <link>https://dev.to/benreturns/customize-navigation-bar-in-android-studio-26h2</link>
      <guid>https://dev.to/benreturns/customize-navigation-bar-in-android-studio-26h2</guid>
      <description>&lt;p&gt;Hello all,&lt;br&gt;
I am currently building a navigation bar for my app. Since I am relatively new, I have one or the other problem.&lt;br&gt;
The desired result should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nb7-czkI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgfvqgqs08grdxv1u61b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nb7-czkI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgfvqgqs08grdxv1u61b.png" alt="Goal layout" width="623" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My version that I have so far looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t4_s0GRC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhe0h4usxxxbsqi850ac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t4_s0GRC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhe0h4usxxxbsqi850ac.png" alt="Current state with the posted code" width="318" height="123"&gt;&lt;/a&gt;&lt;br&gt;
I have the individual icons as .png with and without gradient (white). as well as the background to be displayed when selected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RJZWpyl---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbvbfa90btxf6rvn7rip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RJZWpyl---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbvbfa90btxf6rvn7rip.png" alt="Icon in White for selection" width="82" height="82"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D-GTWbah--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ty1oes81s1z4rcggbqjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D-GTWbah--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ty1oes81s1z4rcggbqjd.png" alt="Icon with gradient if not selected" width="82" height="82"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pKWQMwsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9txvu7s0y6bfm4ddhagz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pKWQMwsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9txvu7s0y6bfm4ddhagz.png" alt="Background if selected" width="181" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the items:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;

    &amp;lt;item
        android:id="@+id/home2"
        android:icon="@drawable/exert_menu_bottom_icon_footprints_gradient"
        android:title="" /&amp;gt;
    &amp;lt;item
        android:id="@+id/steps"
        android:icon="@drawable/exert_menu_bottom_icon_boost_gradient"
        android:title=""
        /&amp;gt;
    &amp;lt;item
        android:id="@+id/transactions"
        android:icon="@drawable/exert_menu_bottom_icon_wallet_gradient"
        android:title=""
  /&amp;gt;
&amp;lt;/menu&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the navigation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottomNavigationView"
            android:layout_width="200dp"
            android:layout_height="60dp"
            android:layout_marginStart="200dp"
            android:layout_marginEnd="200dp"
            android:layout_marginBottom="20dp"
            android:background="@drawable/exert_menu_bottom_border_gradient"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:menu="@menu/bottom_nav" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Questions that arise from this would be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does anyone know another possibility than the bottomnavigation?&lt;/li&gt;
&lt;li&gt;How can I use the colored gradient for the selected page?&lt;/li&gt;
&lt;li&gt;Will this work with .png images or do they have to be .xml files?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for any contribution in advance&lt;/p&gt;

&lt;p&gt;Ben&lt;/p&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>nav</category>
      <category>bar</category>
    </item>
  </channel>
</rss>
