<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SayuriAI on Medium]]></title>
        <description><![CDATA[Stories by SayuriAI on Medium]]></description>
        <link>https://medium.com/@sayuriai?source=rss-330ece63adc3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VJOwctYO0nvXw-fElj-Plg.png</url>
            <title>Stories by SayuriAI on Medium</title>
            <link>https://medium.com/@sayuriai?source=rss-330ece63adc3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:22:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sayuriai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Install Apache NetBeans 12 on CentOS 7| RHEL 8]]></title>
            <link>https://sayuriai.medium.com/install-apache-netbeans-12-on-centos-7-rhel-8-5c74e6008821?source=rss-330ece63adc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c74e6008821</guid>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[centos7]]></category>
            <category><![CDATA[installation]]></category>
            <category><![CDATA[netbeans]]></category>
            <category><![CDATA[install]]></category>
            <dc:creator><![CDATA[SayuriAI]]></dc:creator>
            <pubDate>Tue, 09 Feb 2021 10:15:37 GMT</pubDate>
            <atom:updated>2021-02-09T10:15:37.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*u-omsyQ7gax2ZwA5OJiYOQ.png" /></figure><p>In this guide we will look at how you can install Apache NetBeans 12 on CentOS 8 / RHEL. The guide is very simple and on point.</p><h3><strong>Install the NetBeans dependencies</strong></h3><p>Java JDK</p><pre>sudo dnf install java-11-openjdk  java-11-openjdk-devel</pre><p>Install wget:</p><pre>sudo yum install -y wget</pre><p>Download NetBeans 12.2</p><pre>wget <a href="https://downloads.apache.org/netbeans/netbeans/12.2/Apache-NetBeans-12.2-bin-linux-x64.sh">https://downloads.apache.org/netbeans/netbeans/12.2/Apache-NetBeans-12.2-bin-linux-x64.sh</a></pre><p>Make the script executable</p><pre>chmod +x Apache-NetBeans-12.2-bin-linux-x64.sh</pre><p>Run the script to install netbeans. Don’t run the script with sudo, it will may not work and likely you will get errors on permissions.</p><pre>./Apache-NetBeans-12.2-bin-linux-x64.sh</pre><h3>Conclusion</h3><p>I hope this short process was helpful, feel free to comment below. Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c74e6008821" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Theory]]></title>
            <link>https://sayuriai.medium.com/information-theory-76b46c4ec95a?source=rss-330ece63adc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/76b46c4ec95a</guid>
            <category><![CDATA[information-theory]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[SayuriAI]]></dc:creator>
            <pubDate>Wed, 03 Feb 2021 12:20:56 GMT</pubDate>
            <atom:updated>2021-02-03T12:20:56.339Z</atom:updated>
            <content:encoded><![CDATA[<p>Information theory is a branch of applied mathematics that revolves around the quantification of how much information is present in a signal. This is applied in machine learning to quantify the similarity between probability distributions. The basic intuition behind information theory is that learning that an unlikely event has occurred is more informative than learning that a likely event has occurred (Ian, Yoshua &amp; Aaron, 2016).</p><p>· Likely events — low information content</p><p>· Less likely events — higher information content</p><p>· Independent events — Should have additional information.</p><p>In machine learning, we often want to quantify the difference between the true distribution of a random variable and the observed distribution. Let P(x) and Q(x) be your probability distributions over a random variable x. The difference between the two distributions can be calculated by statistical distance or divergence. In information theory, statistical distance is a measure of distance between two statistical objects. The calculation of the statistical distance relates to the difference of the random variables and which may have a statistical dependence. This means that the distance measure is not directly related to the difference in probability distributions. Thus, this makes it difficult to interpret it hence the preference on the use of divergence. The measure of divergence scores can be achieved using information theory concepts such <strong>as Kullback-Leibler (KL) divergence</strong> and <strong>Shannon entropy.</strong></p><p><strong>To read more, below is a link to my whole article about this on on LinkedIn.</strong></p><p><a href="https://www.linkedin.com/posts/dancan-angwenyi-687752101_informationtheory-ai-deeplearningai-activity-6762703826584686592-rt7m">https://www.linkedin.com/posts/dancan-angwenyi-687752101_informationtheory-ai-deeplearningai-activity-6762703826584686592-rt7m</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76b46c4ec95a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Autoencoders]]></title>
            <link>https://sayuriai.medium.com/autoencoders-751b6f7c2cee?source=rss-330ece63adc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/751b6f7c2cee</guid>
            <dc:creator><![CDATA[SayuriAI]]></dc:creator>
            <pubDate>Tue, 02 Feb 2021 12:41:50 GMT</pubDate>
            <atom:updated>2021-02-02T12:41:50.709Z</atom:updated>
            <content:encoded><![CDATA[<p>Autoencoders learn the encoding of the underlying datasets for the purposes of dimensionality reduction. To achieve this, a bottleneck is imposed in the neural network to produce a compressed representation of the original input. This forces the network to learn the relationship between features in the underlying dataset. If there is an underlying structure, reconstruction of the initial input is possible.</p><p>The network is trained by minimizing the reconstruction error which is a measure of the difference between the reconstructed output and the original input.</p><h4>Denoising Autoencoders</h4><p>This is a type of autoencoders that are used mainly for feature selection and extraction. They modify their learning approach by slightly corrupting the input data. This corruption of the input data can be achieved in many ways, however the main approach used is by introducing blanks in the input.</p><p>Because the input and the target output are different, with this approach, the model isn’t able to simply develop a mapping which memorized the data but is forced to learn a vector field mapping of the input towards a lower dimensional manifold. If this manifold accurately describes the original dataset, then the model has effectively achieved denoising.()</p><p>The diagram below shows the neural network setup of the denoising autoencoder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*_qeog5otDGkdlwwIbsBZPQ.png" /></figure><p>References</p><p>Ian, G., Yoshua, B. &amp; Aaron, C. 2016. <em>Deep Learning. </em>MIT Press.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=751b6f7c2cee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Navigation Drawer and Bottom Navigation on same app]]></title>
            <link>https://sayuriai.medium.com/how-to-create-a-navigation-drawer-and-bottom-navigation-on-same-app-b46cd63f6e31?source=rss-330ece63adc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b46cd63f6e31</guid>
            <category><![CDATA[navigation-drawer]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[fragments]]></category>
            <category><![CDATA[bottomnavigationview]]></category>
            <category><![CDATA[navigation-controller]]></category>
            <dc:creator><![CDATA[SayuriAI]]></dc:creator>
            <pubDate>Sun, 03 May 2020 18:36:07 GMT</pubDate>
            <atom:updated>2020-05-03T18:36:07.232Z</atom:updated>
            <content:encoded><![CDATA[<p>I was building my application some few days ago and was having difficulties setting up the drawer and the bottom navigation view on the same page.</p><p>I actually found a very easy way to do it using the Navigation UI and the Navigation controllers.</p><p><strong>Step 1: </strong>Create a navigation xml file as shown below. The file must contain all the destinations you would like to navigate to via the drawer and the bottom navigation. This was the Navigation Controller will automatically handle the wiring up of the navigation</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;navigation xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:id=&quot;@+id/mobile_navigation&quot;<br>    app:startDestination=&quot;@+id/navigation_home&quot;&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/nav_profile&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.ProfileFragment&quot;<br>        android:label=&quot;@string/profile&quot;<br>        tools:layout=&quot;@layout/fragment_profile&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/nav_friends&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.FriendsFragment&quot;<br>        android:label=&quot;@string/friends&quot;<br>        tools:layout=&quot;@layout/fragment_friends&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/nav_feedback&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.FeedbackFragment&quot;<br>        android:label=&quot;@string/feedback&quot;<br>        tools:layout=&quot;@layout/fragment_feedback&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/nav_settings&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.SettingsFragment&quot;<br>        android:label=&quot;@string/settings&quot;<br>        tools:layout=&quot;@layout/fragment_settings&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/navigation_home&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.HomeFragment&quot;<br>        android:label=&quot;@string/home&quot;<br>        tools:layout=&quot;@layout/fragment_home&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/navigation_sms&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.SmsFragment&quot;<br>        android:label=&quot;@string/messages&quot;<br>        tools:layout=&quot;@layout/fragment_sms&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/navigation_notifications&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.NotificationsFragment&quot;<br>        android:label=&quot;@string/notifications&quot;<br>        tools:layout=&quot;@layout/fragment_notifications&quot; &gt;<br>    &lt;/fragment&gt;<br>    &lt;fragment<br>        android:id=&quot;@+id/navigation_account&quot;<br>        android:name=&quot;sayuriai.com.taaluma.fragments.AccountFragment&quot;<br>        android:label=&quot;@string/account&quot;<br>        tools:layout=&quot;@layout/fragment_account&quot; &gt;<br>    &lt;/fragment&gt;<br>&lt;/navigation&gt;</pre><p><strong>Step 2: </strong>Create a menu file for the drawer as the example below</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;menu xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;&gt;<br>    &lt;group android:checkableBehavior=&quot;single&quot;&gt;<br>        &lt;item<br>            android:id=&quot;@+id/nav_profile&quot;<br>            android:title=&quot;@string/profile&quot;<br>            android:icon=&quot;@drawable/ic_person_grey_24dp&quot;/&gt;<br>        &lt;item<br>            android:id=&quot;@+id/nav_friends&quot;<br>            android:title=&quot;@string/friends&quot;<br>            android:icon=&quot;@drawable/ic_people_grey_24dp&quot;/&gt;<br>        &lt;item<br>            android:id=&quot;@+id/nav_settings&quot;<br>            android:title=&quot;@string/settings&quot;<br>            android:icon=&quot;@drawable/ic_settings_grey_24dp&quot;/&gt;<br>        &lt;item<br>            android:id=&quot;@+id/nav_feedback&quot;<br>            android:title=&quot;@string/feedback&quot;<br>            android:icon=&quot;@drawable/ic_feedback_grey_24dp&quot;/&gt;<br>    &lt;/group&gt;<br>&lt;/menu&gt;</pre><p><strong>Step 3: </strong>Create a menu file for the bottom navigation as the example below</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;menu xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;<br>    &lt;item<br>        android:id=&quot;@+id/navigation_home&quot;<br>        android:icon=&quot;@drawable/ic_home&quot;<br>        android:title=&quot;@string/home&quot; /&gt;<br>    &lt;item<br>        android:id=&quot;@+id/navigation_sms&quot;<br>        android:icon=&quot;@drawable/ic_sms&quot;<br>        android:title=&quot;@string/sms&quot; /&gt;<br>    &lt;item<br>        android:id=&quot;@+id/navigation_notifications&quot;<br>        android:icon=&quot;@drawable/ic_notifications&quot;<br>        android:title=&quot;@string/notification&quot; /&gt;<br>    &lt;item<br>        android:id=&quot;@+id/navigation_account&quot;<br>        android:icon=&quot;@drawable/ic_account&quot;<br>        android:title=&quot;@string/account&quot; /&gt;<br>&lt;/menu&gt;</pre><p><strong>STEP 4:</strong> Create a custom app bar as shown below</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    tools:context=&quot;.activities.MainActivity&quot;&gt;<br>    &lt;LinearLayout<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:orientation=&quot;vertical&quot;&gt;<br>        &lt;com.google.android.material.appbar.AppBarLayout<br>            android:layout_width=&quot;match_parent&quot;<br>            android:id=&quot;@+id/app_bar&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            android:theme=&quot;@style/AppTheme.AppBarOverlay&quot;&gt;<br>            &lt;androidx.appcompat.widget.Toolbar<br>                android:id=&quot;@+id/toolbar&quot;<br>                android:layout_width=&quot;match_parent&quot;<br>                android:layout_height=&quot;?attr/actionBarSize&quot;<br>                android:background=&quot;?attr/colorPrimary&quot;<br>                app:popupTheme=&quot;@style/AppTheme.PopupOverlay&quot; /&gt;<br>        &lt;/com.google.android.material.appbar.AppBarLayout&gt;<br>        &lt;fragment<br>            app:layout_behavior=&quot;@string/appbar_scrolling_view_behavior&quot;<br>            android:id=&quot;@+id/nav_host_fragment&quot;<br>            android:name=&quot;androidx.navigation.fragment.NavHostFragment&quot;<br>            android:layout_height=&quot;0dp&quot;<br>            android:layout_width=&quot;match_parent&quot;<br>            android:layout_weight=&quot;1&quot;<br>            app:defaultNavHost=&quot;true&quot;<br>            app:navGraph=&quot;@navigation/mobile_navigation&quot; /&gt;<br>        &lt;com.google.android.material.bottomnavigation.BottomNavigationView<br>            android:id=&quot;@+id/bottom_navigation&quot;<br>            android:layout_width=&quot;match_parent&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            android:layout_gravity=&quot;bottom&quot;<br>            android:background=&quot;@color/colorPrimary&quot;<br>            app:itemIconTint=&quot;@color/white&quot;<br>            app:itemTextColor=&quot;@color/white&quot;<br>            app:menu=&quot;@menu/bottom_navigation_menu&quot; /&gt;<br>    &lt;/LinearLayout&gt;<br>&lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;</pre><p><strong>Step 5: </strong>In you main actvity xml file</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;androidx.drawerlayout.widget.DrawerLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:id=&quot;@+id/navigation_layout&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    android:fitsSystemWindows=&quot;true&quot;<br>    tools:context=&quot;.activities.MainActivity&quot;<br>    tools:openDrawer=&quot;start&quot;&gt;<br>    &lt;include<br>        layout=&quot;@layout/app_bar_layout_custom&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;wrap_content&quot; /&gt;<br>    &lt;com.google.android.material.navigation.NavigationView<br>        android:id=&quot;@+id/navigation_view&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:layout_gravity=&quot;start&quot;<br>        android:fitsSystemWindows=&quot;true&quot;<br>        app:menu=&quot;@menu/navigation_menu&quot;&gt;<br>    &lt;/com.google.android.material.navigation.NavigationView&gt;<br>&lt;/androidx.drawerlayout.widget.DrawerLayout&gt;</pre><p><strong>Step 6:</strong> Now you are all set, create the fragments for all the destinations that you defined in the navigation file. Once that is done, in your main activity setup the Navigation controller and the Navigation UI as shown below.</p><pre>@Override<br>protected void onCreate(Bundle savedInstanceState) {<br>    super.onCreate(savedInstanceState);<br>    setContentView(R.layout.<em>activity_main</em>);<br>    // Passing each menu ID as a set of Ids because each<br>    // menu should be considered as top level destinations.<br>    mToolbar = (Toolbar) findViewById ( R.id.<em>toolbar </em>);<br>    setSupportActionBar ( mToolbar );<br>    Objects.<em>requireNonNull</em>(getSupportActionBar()).setDisplayHomeAsUpEnabled ( true );<br>    getSupportActionBar ().setDisplayShowHomeEnabled(true);<br>    drawerLayout = findViewById(R.id.<em>navigation_layout</em>);<br>    navigationView = findViewById ( R.id.<em>navigation_view </em>);<br>    mAppBarConfiguration = new AppBarConfiguration.Builder(<br>            R.id.<em>navigation_home</em>, R.id.<em>navigation_sms</em>,R.id.<em>navigation_notifications</em>,R.id.<em>navigation_account</em>)<br>            .setDrawerLayout(drawerLayout)<br>            .build();<br>    NavController navController = Navigation.<em>findNavController</em>(this, R.id.<em>nav_host_fragment</em>);<br>    NavigationUI.<em>setupActionBarWithNavController</em>(this, navController, mAppBarConfiguration);<br>    NavigationUI.<em>setupWithNavController</em>(navigationView, navController);<br>    getSupportActionBar ().setDisplayHomeAsUpEnabled ( true );<br>    bottomNavigation = findViewById(R.id.<em>bottom_navigation</em>);<br>    NavigationUI.<em>setupWithNavController</em>(bottomNavigation, navController);<br><br>    View navView = navigationView.inflateHeaderView ( R.layout.<em>navigation_header_layout</em>);<br>    NavProfileImage = navView.findViewById ( R.id.<em>nav_profile_image </em>);<br>    NavProfileFullName =  navView.findViewById ( R.id.<em>nav_user_full_name </em>);<br>    NavProfileEmail =  navView.findViewById ( R.id.<em>nav_user_email </em>);<br><br>    //Handle visibility of the application bottom navigation<br>    navController.addOnDestinationChangedListener(new NavController.OnDestinationChangedListener() {<br>        @Override<br>        public void onDestinationChanged(@NonNull NavController controller, @NonNull NavDestination destination, @Nullable Bundle arguments) {<br>            if(destination.getId()== R.id.<em>nav_profile </em>|| destination.getId()== R.id.<em>nav_settings<br>            </em>||destination.getId()== R.id.<em>nav_feedback </em>|| destination.getId()== R.id.<em>nav_friends</em>){<br>                bottomNavigation.setVisibility(View.<em>GONE</em>);<br>            }<br>            else{<br>                bottomNavigation.setVisibility(View.<em>VISIBLE</em>);<br>            }<br>        }<br>    });<br>}</pre><p><strong>Step 7:</strong> Include the <em>onSupportNavigateUp( ) </em>method as shown below. This will help to automatically handle the back arrow navigation and also the back button when pressed. Thus you don’t have to setup up that in your code</p><pre>@Override<br>public boolean onSupportNavigateUp() {<br>    NavController navController = Navigation.<em>findNavController</em>(this, R.id.<em>nav_host_fragment</em>);<br>    return NavigationUI.<em>navigateUp</em>(navController, mAppBarConfiguration)<br>            || super.onSupportNavigateUp();<br>}</pre><p><strong>Conclusion</strong></p><p>I hope you find this useful. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b46cd63f6e31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Dialog with Edit Text]]></title>
            <link>https://sayuriai.medium.com/custom-dialog-with-edit-text-b7487a3e8e2b?source=rss-330ece63adc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7487a3e8e2b</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[SayuriAI]]></dc:creator>
            <pubDate>Sat, 18 Apr 2020 08:38:09 GMT</pubDate>
            <atom:updated>2020-04-18T08:38:09.335Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Below is an example custom dialog:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*s8zY0GtqnaPYo8o0x9xneg.jpeg" /></figure><p>Step 1: Create a custom layout as the example below:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    android:layout_margin=&quot;8dp&quot;<br>    android:orientation=&quot;vertical&quot;&gt;<br><br>    &lt;TextView<br>        android:id=&quot;@+id/dialog_title&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:padding=&quot;8dp&quot;<br>        android:text=&quot;Title&quot;<br>        android:textColor=&quot;@color/colorPrimary&quot;<br>        android:textSize=&quot;18sp&quot; /&gt;<br><br>    &lt;EditText<br>        android:id=&quot;@+id/edt_comment&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:hint=&quot;label_type_your_comment&quot;<br>        android:inputType=&quot;text&quot;<br>        android:padding=&quot;8dp&quot;<br>        android:textSize=&quot;15sp&quot; /&gt;<br><br>    &lt;RelativeLayout<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:orientation=&quot;horizontal&quot;&gt;<br>        &lt;TextView<br>            android:id=&quot;@+id/buttonSubmit&quot;<br>            android:layout_width=&quot;wrap_content&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            android:layout_alignParentRight=&quot;true&quot;<br>            android:padding=&quot;8dp&quot;<br>            android:text=&quot;Save&quot;<br>            android:textColor=&quot;@color/colorPrimary&quot;<br>            android:textSize=&quot;15sp&quot; /&gt;<br><br>        &lt;TextView<br>            android:id=&quot;@+id/buttonCancel&quot;<br>            android:layout_width=&quot;wrap_content&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            android:layout_marginRight=&quot;8dp&quot;<br>            android:layout_toLeftOf=&quot;@+id/buttonSubmit&quot;<br>            android:padding=&quot;8dp&quot;<br>            android:text=&quot;Cancel&quot;<br>            android:textColor=&quot;@color/colorPrimary&quot;<br>            android:textSize=&quot;15sp&quot; /&gt;<br>    &lt;/RelativeLayout&gt;<br><br>&lt;/LinearLayout&gt;</pre><p>Step 2: Create a method for showing the dialog for you to be able to reuse it: Below example shows an example method that takes in 3 parameters and saves the data to a firebase database in case of data change.</p><pre>public void showDialog(String str, String tag ,String child){<br><br>    final AlertDialog dialogBuilder = new AlertDialog.Builder(getContext()).create();<br>    LayoutInflater inflater = this.getLayoutInflater();<br>    View dialogView = inflater.inflate(R.layout.dialog_custom, null);<br><br>    TextView title =  dialogView.findViewById(R.id.<em>dialog_title</em>);<br>    title.setText(&quot;Edit your &quot;+tag);<br>    final EditText editText = (EditText) dialogView.findViewById(R.id.<em>edt_comment</em>);<br>    editText.setHint(str);<br>    TextView save =  dialogView.findViewById(R.id.<em>buttonSubmit</em>);<br>    TextView cancel =  dialogView.findViewById(R.id.<em>buttonCancel</em>);<br><br>    cancel.setOnClickListener(new View.OnClickListener() {<br>        @Override<br>        public void onClick(View view) {<br>            dialogBuilder.dismiss();<br>        }<br>    });<br>    save.setOnClickListener(new View.OnClickListener() {<br>        @Override<br>        public void onClick(View view) {<br>            String value = editText.getText().toString();<br>            if(TextUtils.<em>isEmpty</em>(value)){<br><br>            }<br>            else{<br>                mUserReference.child(child).setValue(value);<br>            }<br><br>            dialogBuilder.dismiss();<br>        }<br>    });<br>    dialogBuilder.setView(dialogView);<br>    dialogBuilder.show();<br><br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7487a3e8e2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to change the Toolbar Icons Color]]></title>
            <link>https://sayuriai.medium.com/how-to-change-the-toolbar-icons-color-c67d17da38cc?source=rss-330ece63adc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c67d17da38cc</guid>
            <category><![CDATA[actionbar]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[SayuriAI]]></dc:creator>
            <pubDate>Sat, 18 Apr 2020 08:16:27 GMT</pubDate>
            <atom:updated>2020-04-18T08:16:27.356Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Changing the color of the icons on your toolbar when using a custom one is actually very simple. You just need to change the theme of your toolbar to app:popupTheme=”@style/AppTheme.PopupOverlay” in the custom layout as shown below</blockquote><pre>&lt;com.google.android.material.appbar.AppBarLayout<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    android:theme=&quot;@style/AppTheme.AppBarOverlay&quot;&gt;<br>    &lt;androidx.appcompat.widget.Toolbar<br>        android:id=&quot;@+id/toolbar&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;?attr/actionBarSize&quot;<br>        android:background=&quot;?attr/colorPrimary&quot;<br>        app:popupTheme=&quot;@style/AppTheme.PopupOverlay&quot; /&gt;<br>&lt;/com.google.android.material.appbar.AppBarLayout&gt;</pre><blockquote>If you havent change your styles.xml file much. It should look similar to the one shown below.</blockquote><pre>&lt;resources&gt;<br><br>    &lt;!-- Base application theme. --&gt;<br>    &lt;style name=&quot;AppTheme&quot; parent=&quot;Theme.AppCompat.Light.NoActionBar&quot;&gt;<br>        &lt;!-- Customize your theme here. --&gt;<br>        &lt;item name=&quot;colorPrimary&quot;&gt;@color/colorPrimary&lt;/item&gt;<br>        &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;<br>        &lt;item name=&quot;colorAccent&quot;&gt;@color/colorAccent&lt;/item&gt;<br>    &lt;/style&gt;<br>    &lt;style name=&quot;ToolbarTheme&quot; parent=&quot;Theme.AppCompat.Light.NoActionBar&quot;&gt;<br>        &lt;!-- Customize color of navigation drawer icon and back arrow --&gt;<br>        &lt;item name=&quot;colorControlNormal&quot;&gt;@color/white&lt;/item&gt;<br>    &lt;/style&gt;<br><br>    &lt;style name=&quot;AppTheme.NoActionBar&quot;&gt;<br>        &lt;item name=&quot;windowActionBar&quot;&gt;false&lt;/item&gt;<br>        &lt;item name=&quot;windowNoTitle&quot;&gt;true&lt;/item&gt;<br>    &lt;/style&gt;<br><br>    &lt;style name=&quot;AppTheme.AppBarOverlay&quot; parent=&quot;ThemeOverlay.AppCompat.Dark.ActionBar&quot; /&gt;<br>    &lt;style name=&quot;AppTheme.PopupOverlay&quot; parent=&quot;ThemeOverlay.AppCompat.Light&quot; /&gt;<br><br><br>&lt;/resources&gt;</pre><blockquote>I hope you find this useful.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c67d17da38cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>