<?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 Hamza Ahmed (Bidchol) on Medium]]></title>
        <description><![CDATA[Stories by Hamza Ahmed (Bidchol) on Medium]]></description>
        <link>https://medium.com/@hamzzza.ahmed95?source=rss-194d5e60ddbe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y6TIzEcqw8G0pxYuv8jraw.jpeg</url>
            <title>Stories by Hamza Ahmed (Bidchol) on Medium</title>
            <link>https://medium.com/@hamzzza.ahmed95?source=rss-194d5e60ddbe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 23:05:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hamzzza.ahmed95/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[2023 is over, 2024 is going to over]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">&#x201C;As time ticks away, we edge closer to our eventual end.&#x201D;</p><p class="medium-feed-link"><a href="https://medium.com/@hamzzza.ahmed95/2023-is-over-2024-is-going-to-over-05bafc0d5672?source=rss-194d5e60ddbe------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@hamzzza.ahmed95/2023-is-over-2024-is-going-to-over-05bafc0d5672?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/05bafc0d5672</guid>
            <category><![CDATA[values]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[excellence]]></category>
            <category><![CDATA[appreciation]]></category>
            <category><![CDATA[happiness]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Tue, 02 Jan 2024 17:16:12 GMT</pubDate>
            <atom:updated>2024-01-02T17:16:12.239Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to ace interviews as an ordinary Software Engineer — part 2]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@hamzzza.ahmed95/how-to-ace-interviews-as-an-ordinary-software-engineer-part-2-1c1638cd4406?source=rss-194d5e60ddbe------2"><img src="https://cdn-images-1.medium.com/max/2600/1*QrHy4it72zIKS04jcs3-Xg.jpeg" width="5040"></a></p><p class="medium-feed-snippet">We&#x2019;re now entering the segment of the interview that emphasizes the technical aspects exclusively. (If you have not checked the first&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@hamzzza.ahmed95/how-to-ace-interviews-as-an-ordinary-software-engineer-part-2-1c1638cd4406?source=rss-194d5e60ddbe------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@hamzzza.ahmed95/how-to-ace-interviews-as-an-ordinary-software-engineer-part-2-1c1638cd4406?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c1638cd4406</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Tue, 12 Dec 2023 13:32:35 GMT</pubDate>
            <atom:updated>2023-12-12T13:32:35.842Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to ace interviews as an ordinary Software Engineer — part 1]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/how-to-ace-interviews-as-an-ordinary-software-engineer-part-1-170a1fd98c26?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/170a1fd98c26</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[struggle]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Tue, 05 Dec 2023 17:08:35 GMT</pubDate>
            <atom:updated>2023-12-05T17:08:35.540Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to ace interviews as an ordinary Software Engineer — part 1</h3><p>Struggling to excel in interviews? You’re in the right place!.</p><p>Over the course of three months, I gave almost 100 interviews with nearly 50 companies. The invaluable experience gained during this period was extraordinary. I have divided the entire interview into three sections. I’ll dive deeper into first section of this transformative journey in this blog, shedding light on the insights and lessons learned along the way so that you can also relate during your journey. Lets get’s started!</p><h3>Presenting Your Pinnacle Work Experience</h3><p>A successful start to an interview sets the tone for the entire conversation. One of the most common opening questions is, ‘Tell me about your past work experience and the projects you’ve worked on.’ When responding to this query, it’s vital to emphasize projects that made a significant impact on your previous organization or work.</p><p>Let’s try to understand each aspects by the following example <strong>(Food App Delivery):</strong></p><h4><strong>1. Talk About Your Contributions and Influence:</strong></h4><ul><li>Discuss how your actions positively impacted projects or teams.</li><li>Explain your role in making significant changes or improvements.</li><li>Highlight how your efforts influenced outcomes or decisions positively.</li></ul><p>Lets try to understand it by taking the following example!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjU4WVyw5jdsdo5S_WQjZg.jpeg" /></figure><p>Let’s say you have implemented <strong>Drivers Rating</strong>, you identified a crucial gap within the existing system. The system overlooked the impact of cancellation orders on driver ratings, allowing frequent cancellations without consequences. Recognising this issue, You proposed a solution, assigning less deliveries to drivers with high cancellation rates.</p><h4><strong>2. Talk About Numbers:</strong></h4><ol><li>Discuss the size or growth of the user base, highlighting its significance.</li><li>Describe the numerical data indicating user statistics or metrics.</li><li>Emphasize the impact or influence of these numbers on the business or product.</li></ol><p>Lets try to understand it by taking the following example!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiFJryUz7XTEoD8Pkm3H9g.jpeg" /></figure><p>Suppose you’ve introduced a feature where<strong> customers can track their order</strong> <strong>status</strong>, which involves millions of requests per seconds. You recognize the significance of high throughput and recommended utilizing an event streaming platform. This indicates your concern for efficient implementation capable of accommodating millions of users seamlessly. These explanation will give interviewer an impression of how reliable and scalable solutions you think to design as an Engineer.</p><h4><strong>3. Talk About User Experience / User Centric Approach:</strong></h4><ol><li>Discuss strategies or efforts made to prioritize user needs and preferences.</li><li>Emphasize the significance of a user-centric approach in product design or service delivery.</li></ol><p>Lets try to understand it by taking the following example!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJ2JcalpM8W2m9uvaLfy2w.jpeg" /></figure><p>Suppose you’ve implemented the “User cancels an order” feature based on Figma designs comprising three steps. However, you’ve devised a solution enabling users to cancel an order with just two actions (2 steps). This explanation will give interviewer an impression of how you care about the user experience and understanding the significance of user perspectives in enhancing features.</p><h4><strong>4. Talk About Team Work:</strong></h4><ol><li>Discuss collaborative efforts and shared achievements within a team setting.</li><li>Highlight the importance of coordination and support among team members.</li><li>Emphasize the value of teamwork in achieving common goals and success.</li></ol><p>Lets try to understand it by taking the following example!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tcxq4ffCVLR1_lGWNMYHgg.jpeg" /></figure><p>Let’s say your manager asked you to complete the feature in three days. As a Software engineer you recognised the importance of leveraging your team’s collective strength. You have involved your team members to divide workload effectively and to achieve the success together. This explanation will give interviewer an impression that you understand about the team efforts and know the significance of celebrating achievements together.</p><h4><strong>5. Talk About Business:</strong></h4><ol><li>Find and solve business problems.</li><li>Explore strategies and objectives aimed at maximizing profits.</li><li>Emphasize the importance of profitability.</li></ol><p>Lets try to understand it by taking the following example!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cysm1XFWoVqPZE9SZY9obA.jpeg" /></figure><p>Imagine you’re making a feature for <strong>users to order a food</strong>. You realize that whether they order during regular hours or peak hours, the price remains the same. You suggest a solution: during peak hours or when many people are ordering, increase the prices. This way, we can make more money than before. This idea shows the interviewer that you understand business problems too. You can figure out business issues and find smart solutions.</p><h3><strong>Conclusion:</strong></h3><p>In summary, providing the most effective response to the question significantly increases the likelihood of securing a job. Perfection is unattainable, and everyone possesses individual work experiences, However, the skill lies in presenting these experiences artfully, a craft that requires learning. One method of learning is to break down your past work experiences into above five factors and mapping them with each aspect.</p><p><strong>Note:</strong> This is part-1 related to first quarter of the interview. The links of part-2 and part-3 will be available in some days)</p><p>Happy Interviewing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=170a1fd98c26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing React Components for Beginners]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/testing-react-components-for-beginners-fc3e37d0628a?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc3e37d0628a</guid>
            <category><![CDATA[react-testing-library]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[jest]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Fri, 21 Jan 2022 19:50:42 GMT</pubDate>
            <atom:updated>2022-01-22T07:35:28.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oIRohYMKd97DkPFqzc2IFQ.png" /></figure><p>Are you excited to get started with testing React Components? <a href="https://emojipedia.org/star-struck/">🤩</a> Let’s go! :)</p><h3>Key Takeaways:</h3><ol><li>What is black box testing?</li><li>Testing single component</li><li>Testing multiple components</li><li>What is mocking and why we need to mock functions?</li><li>Mocking utility functions</li><li>Mocking promises or async/await</li><li>Mocking API’s</li></ol><p>Let’s take a look at all of these one by one:</p><h4>1. What is black box testing?</h4><p>It is a testing technique in which we don’t have any access of the internals of the component. The only way we can interact or access component by its public API/functions. Let’s try to understand by taking the example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*HrXFDL8WUm5xs9wvOQe18A.png" /></figure><p>As you can see in the above picture, we have one component which is called “Test” and we are exporting that component which means we are allowing other files to access that component. So in a nutshell of Black Box testing:</p><ol><li>We cannot set the local state of the component directly (“isFirstTime” in our case)</li><li>The only way we can change the value of local state and render the component is exactly how you want from the code to do it. i.e. by firing the event “onClickButton”</li></ol><blockquote>Note: If you don’t want this approach, then you can start using “Enzymes” as it uses White box testing and it allows you to set local states and use Shallow Rendering, which means it does not test child components. But we will be using React Testing library to handle our test cases because we will be following black box testing technique.</blockquote><p>Advantages:</p><ol><li>It helps developer to test the component as it is supposed to be used by User in real world.</li><li>It helps to cover all the test flows a user can possibly access in real world</li></ol><p>Disadvantage:</p><ol><li>It might be harder to implement this approach in existing code base. For example if you want to add some feature of three lines in existing file which has already 500 lines of code, so it’s hard to link all the flows with your additional change.</li></ol><h4>2. Testing single component</h4><p>Testing a single component is very straight forward. Let’s try to look at the following example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*3oUjH6Xz7D3DoUhaH2PetQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*Fiw4NVHOf_wTkg3NYj6byw.png" /></figure><p>As you can see in the above picture (left), we have one “Test” component that renders some JSX and we are testing that component (right picture). So the steps to test the component are:</p><ol><li>Importing Test component.</li><li>Using “render” method from react testing library to render Test component.</li><li>Checking if container is defined or not.</li></ol><h4>3. Testing multiple components</h4><p>Testing multiple components require more than one component to be involved. Let’s try to look at the following example and try to understand how we can test multiple components:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYV3F1Oc3UwjBFuzZzK8Iw.png" /></figure><p>As you can see in the picture (left one) above, we have one additional component “TestFile” and it will render only when local state <strong>isFirstTime</strong> will be false. To do that we have to fire an event “onClickButton” to change the local state. Since we are following Black box testing, so we can’t set the local state in our testing file. Steps to test multiple components are:</p><ol><li>Render the Test component by default props and states (i.e. isFirstTime is false)</li><li>Getting the text “Click me” from the Test component by <strong>getByText</strong> utility function and fire an event which invoked “<strong><em>onClickButton</em></strong>” and set the state “isFirstTime” to True which caused TestFile to render.</li></ol><h4>4. Testing utility functions</h4><p>Utility functions can be tested in isolation and there is no need to clean up the DOM after each test as there is no DOM Manipulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MP9VDNQyCI2mukk3HwZfGQ.png" /></figure><p>As you can see in the above picture, we have one function “<strong>reverseString</strong>”. To test this function, we have to first import this function in our test file and call this function by giving different values: one for success case (in our case) and one for failure case.</p><h4>5. Mocking functions</h4><p>First we need to understand what is meant by mocking and why we need to mock the functions?</p><p>Mocking means “doing something which is not real”. In the context of testing, mocking a function means, we call fake functions instead of real functions because our goal is not to test that function but instead to test a component where that function is used. Lets try to understand by taking an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egf5ehXuX5AKCNReA4j2sQ.png" /></figure><p>If you see the left picture, we are mocking “reverseString” on line 16 by using “Jest.SpyOn” function and also mocking return value for success case. In our case we are giving return value “olleH” because the function “reverseString” will return “olleH for Hello”.</p><p>Two things that you need to keep in mind while mocking any function:</p><ol><li>You need to mock return value as well if the function is returning anything, whether it is for success case or for failure case depend on which flow you want to test in your component.</li><li>We are not testing the function instead we are testing the flow of component where this function is used. So to keep the flow of the component going, we have to mock the function by giving the success return value or failure return value. (in our case, we gave success return value i.e. “olleH”)</li></ol><h4>5. Mocking promises</h4><p>The concept of Async/Await and promises are quite different and many developers confuse sometimes to manipulate it. I break down this part into three steps for better understanding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r4gr66xVt8hRXVsuJuufaw.png" /></figure><p>Let’s try to understand the flow first:</p><ol><li>We have one utility function which is called <strong>CallPromiseFunction</strong> with three arguments, boolean value, success callback and failure callback that we are invoking inside component’s useEffect.</li><li>CallPromiseFunction is calling another function <strong>CallPromiseTest</strong> which returns a promise.</li><li>CallPromiseTest is a promise and that is resolve or reject depending on the boolean argument.</li></ol><p>So we have this flow and we have to mock the <strong>callPromiseFunction</strong> that is used inside useEffect. Let’s see how we can mock this function which calls another function that returns a promise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6oss_Dhu0Xp1lLwiwMm9hQ.png" /></figure><p>CallPromiseTest return a promise so we have to mock it’s return value as resolve or reject. (make sure you are returning the expected result). In our case, the function just check if return value has the data object or not</p><h4>6. Mocking API’s</h4><p>Purpose of mocking API’s is same as other functions. We don’t want to bother ourselves to wait for API response rather we will mock it and give the mock response value so that we continue with our testing flow in component. Let’s try to understand by following example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*uHulougmHlDvv4Ke1LGf0w.png" /></figure><p>This is a simple axios post request with first argument as api endpoint and second as request. If we want to mock this API request how we can do this? Let’s see below example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*WjFV9zDrvRX9LuPl2vuDRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*Dn_rSH_l27602auwseyZRA.png" /></figure><p>As you can see we are using <strong>onPost</strong> function to mock the API Request and <strong>reply</strong> for setting that how we want response:</p><ol><li>Giving 200 status code as we want our API to be succeed.</li><li>Giving a mock data so that we can work with the flow where this API is called with this mock data.</li></ol><p>That’s it. If you have any queries, feel free to comment! <a href="https://emojipedia.org/grinning-face-with-big-eyes/">😃</a></p><p>Happy coding folks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc3e37d0628a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master the Android Interview (Basics)]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/master-the-android-interview-basics-3f7511a4a2fc?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f7511a4a2fc</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-apps]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Fri, 15 Feb 2019 19:16:14 GMT</pubDate>
            <atom:updated>2019-02-15T19:16:14.606Z</atom:updated>
            <content:encoded><![CDATA[<h3>Life Cycles of activity:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*ETUYyJwBGoFsqzeCHOsEcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Au1Lh5y00ozXUpVFxDdgA.jpeg" /></figure><p>When you launch any app from your home screen “Snapchat” in this example, then three functions will be called: onCreate(),onStart(),onResume() then the app will be launched. When you go out from your app then there will be two conditions from which you can exit. By pressing home Button and by pressing Back Button. In both cases onPause() and onStop() methods will be called but App will not be destroyed when pressing Home Button. Which means application destroys only when back button is pressed, so onDestroy() will be called in the case of Back button pressed, as you can see in the above picture.</p><h3>Intents:</h3><p>Intents are “actions” in android. There are two types of Intents: Explicit Intents and Implicit intents as you can see the picture below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7LqfXF8_20C9110zJ81iog.jpeg" /></figure><p>Here two buttons are shown in the screen.<strong> Open Camera</strong> and <strong>Download mp3.</strong> By tapping on any one button, an action (intent) will be performed.</p><ol><li>Explicit Intents: It means you know who will be handled your action. In this case download mp3 file. So you specify this intent in your app. More examples could be starting one activity from another etc.</li><li>Implicit Intents: It means you don’t know who will be handled your action in your app. Because it belongs to outside of your app. In the above example, another app (Camera app) receives your action and performs accordingly. More examples could be opening contacts, opening location etc..</li></ol><h3>Permissions:</h3><p>There are two types of permission in android:</p><ol><li>Run time permissions (introduced in Android 6.0)</li><li>Install-time permissions</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bd6jSCa--m4W1mdvYOhrYw.jpeg" /></figure><p>If we talk about Install time permission then it means, we are giving permissions in manifest file. If we talk about Run time permissions, then this means it will be executed when you launch any app and try to open camera by tapping on camera button or any similar kind of situation like, share with contacts (open contacts etc..) so at that time a pop up will come up like right side of screen and at that time you can allow it or deny it. Run Time permissions has been added in Android 6.0 (Marshmallow).</p><h3>Sending data from one activity to another:</h3><h4>1. Intents</h4><p>The most common way to send data from first activity to second activity with the use of Intents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2D3s4IskH_YggFXrtU4aQ.jpeg" /></figure><p>As you can see in the picture, when you fill the login screen and hit the login button, it will navigate to second activity with holding those data in bag pack with the help of intent and with the help of intent.getString() function you can get the required data.</p><h4>2. Shared Preferences:</h4><p>Another way to send data within activities is Shared Preferences. Shared Preferences hold any kind of data which you can use in any place of your application. Its just like local db SQLite but with some limitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHi2IKOop4-WeY1Rn7W17Q.jpeg" /></figure><p>As you can see, there is a similar way to send data via Shared Preferences, except one thing when you get data then you have to put default value in case of required value is not found. (In our case “NA” is given as default value).</p><h3>Services in Android:</h3><p>Services is one of the major pillars of android which is used when you need to perform any background task without disturbing application flow. The background services are independent of the application life cycles. Once the service has run, it wont be stop when your application is closed. It will be running as a background task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGONdelDsEq7o8X1uq-veQ.jpeg" /></figure><p>As you can see when you open music app for listening your favorite songs, after that you play any song and go out from your app (by pressing home button or back button) now you are not in your app but still music is playing in the background. This is what services do for you in android. It offers you to do some work in your background. Another examples are downloading file in the background etc..</p><h3>Back stack and Fragments:</h3><h4>1. Back stack:</h4><p>The term “Back stack” in android means how Activities are put behind the scenes. Lets understand this by taking the below example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1MzLfor_U9qdlPm_d4E0eQ.jpeg" /></figure><p>Here you can see the famous chatting app “WhatsApp”. We have taken an example from it. If you see the very first picture from your left, there is one common activity that initially appears when you open your whatsApp. Thats we call “HomeActivity” so it is going to the stack as our first activity. When you swap left to see “Status” there you can see there’s no any new activity added in stack because “Status” is not activity it is a fragment (we ll see right after this). again we swap for checking the calls and again we see no activity added in stack just because “Calls” is a fragment too. But now we open Settings (fourth picture from your left) there you see “SettingsActivity” has been added in stack because this is not a fragment, it’s an Activity. so its added in the backstack with HomeActivity. When you tapped on Acount in SettingsActivity then another Activity has been added in the backstack and i.e. AccountActivity. So this is how the things working. Stack is LIFO so if you going back then current Activity will pop up from stack and Settings Activity will be opened Because its now the last in the stack.</p><h4>2. Fragments:</h4><p>Fragment represents any part of an activity. It’s life depends on the activity. If activity is destroyed then all of its fragments will also be destroyed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvQCwNGcC5TTeZemizIb7Q.jpeg" /></figure><p>Here you can see one Activity hosts multiple fragments. In this case HomeActivity hosts three fragments: ChatsFragment, StatusFragment, CallsFragment. Benifits of using Fragment can be seen with this example that you don’t need to create multiple activities for doing multiple work. The more activities is created the more stack is filled and because of that your application performance decreases due to increase in size of an application.</p><h3>Networking and API calls:</h3><p>Networking plays important role in performance analysis in any android applications. Make an API calls is not responsive by default because all of our app is running on main thread or UI Thread and making a call disturb the Main Thread which leads to the blockage of an app.</p><h4>1. Threads:</h4><p>Thread is something which allows you to do network call easily without disturbing its Main UI Thread. It is a java feature not a native android feature. How Thread solves this blockage problem by simply creating another thread for this purpose only. Look at the below Picture :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H9-qEr-x-M_FDenu1pZaVw.jpeg" /></figure><p>In the picture, what really noticing point is the time taken from loading data to showing data. That time is not fixed because it depends on multiple factors such as internet connectivity, server load etc..So as we don’t know the exact time so we left this work to be on another background thread so that our app won’t be the case of ANR (Application Not Responding)</p><h4>2. AsyncTask:</h4><p>Its a class that runs asynchronously in the background. This is not a java feature but android native provides this class to handle background tasks more specifically than other threads. It provides four methods: onPreExecute(), doInBackground(), onProgressUpdate<strong>,</strong> onPostExecute(</p><h3>Android Debug Bridge (ADB):</h3><p>Android allows you to control its OS by communicating with the device using ADB. It’s a command line tool just like NPM in javascript. Some important commands are listed below:</p><ol><li>adb connect &lt;IP&gt; (Connect with IP of device)</li><li>adb shell (Opening shell )</li><li>adb logcat (showing logs of the devices)</li><li>adb uninstall -r &lt;pacakge name&gt; (uninstall the application)</li><li>adb reboot (reboot the device)</li><li>adb install -r &lt;apk&gt; (install the apk)</li><li>adb kill-server (kill all the connected devices</li><li>adb disconnect (disconnecting all the connected devices)</li></ol><h3>Socket Programming in Android:</h3><p>Socket Programming can be done in android by the following picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uh_hDKIhs0ScDoaCNwSA_g.jpeg" /></figure><p>using telnet protocol, you can communicate with your android app. Here in the above example, after making successful connection with telnet, the “restart” command was sent to the device. This is how you can communicate between the devices and the processes.</p><h3>It’s Time:</h3><p>This blog focused on the basic concepts of android. I hope you all get the benefits from this blog.</p><p>-HAPPY ANDROID-ING! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f7511a4a2fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Bar charts using LinearLayouts in Android]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/designing-bar-charts-using-linearlayouts-in-android-d01e9846678e?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/d01e9846678e</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-xml]]></category>
            <category><![CDATA[xml]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Wed, 11 Apr 2018 19:20:22 GMT</pubDate>
            <atom:updated>2018-04-11T19:20:22.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ze23G0AioX_gruFfyq_DCA.jpeg" /></figure><p>LinearLayout always play an important role in structuring a User Interface of an app. LinearLayout does strict all its children in a single direction (i.e. vertically or horizontally). We are designing a circle with a combination of some LinearLayouts in a step by step and in a most easiest way.</p><h4>1. Creating Parent LinearLayout</h4><p>First of all we have to create one LinearLayout which will be our <strong>Parent LinearLayout</strong> and it’s orientation (i.e. how the children of this Layout aligned, vertically or horizontally) is set to be “Vertical” because It will have two vertical children.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqUfu5mwixzZb3CxyGgJqw.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*N9Hcd7rA_EivyWmnoEsgZg.png" /></figure><h4>2. Creating Two Vertical LinearLayouts</h4><p>After done with the first step, now we have to create two LinearLayouts inside of Parent Layout. As you can see in the figure, first LinearLayout contains eight vertical lines (black,pink,green,blue,purple,orange,gray,red). Second LinearLayout contains only one black horizontal line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ujxBYZzr0R4qohVBEVBNvg.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*xgmHcGqg0QOC4-xCaHsslA.png" /></figure><h4>3. Creating eight horizontal lines using View</h4><p>After done with creating two V<strong>ertical LinearLayouts</strong>, now for first <strong>Vertical LinearLayouts</strong> we will create eight <strong>Horizontal children of vertical Lines </strong>as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jqp66p4ADxPOJIzMDc_E8w.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*DWocGTSuZwUmzCsgEgRT_A.png" /></figure><h4>4. Creating one black view</h4><p>Similarly we create second LinearLayout by adding only one black view in it as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lur9It9U6eeKhv4mY7K4Ig.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*1WfyKAKN0mEkyqZ8tx1DnQ.png" /></figure><h4>4. Difference between Vertical view and horizontal view</h4><p>we can draw horizontal view by setting width as wrap_content and height as 0 to 20 dp. and similarly we can draw vertical view by setting width as 0 to 20dp and height as wrap_content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSHgt-g1GGFDuTDDauioiQ.jpeg" /></figure><h3><strong>5.Dynamically changes the graph</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xfe2FWYFCTQ8VEt-L-j15g.jpeg" /><figcaption>whenever the count increases, the height of the view also increases. In this way you can easily draw graphs in Android and make things work!</figcaption></figure><p>Happy Coding! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d01e9846678e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four Pillars of Object Oriented Programming (OOP)]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/four-pillars-of-object-oriented-programming-oop-e8d7822aa219?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8d7822aa219</guid>
            <category><![CDATA[abstraction]]></category>
            <category><![CDATA[polymorphism]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[inheritance]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Thu, 01 Mar 2018 22:01:50 GMT</pubDate>
            <atom:updated>2023-04-05T10:29:07.145Z</atom:updated>
            <content:encoded><![CDATA[<p>There are four Pillars of Object Oriented Programming:</p><ul><li>Abstraction</li><li>Encapsulation</li><li>Inheritance</li><li>Polymorphism</li></ul><p>Lets try to understand each of them in a most easiest way!</p><h3>1. What is Abstraction?</h3><p><strong>Abstraction of Data or Hiding of Information</strong> is called <strong>Abstraction</strong>! or in other words, what are those things that a user is concerned about. Lets try to understand it by taking an example of an Uber app!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*le43PsHF9M31f3diKjBQ-A.jpeg" /></figure><p>Lets try to understand the flow of the app:</p><ol><li>In figure (A): When you want to book a ride, you have to <strong>Enter a</strong> <strong>pick-up point</strong>.</li><li>In figure (B): After done with touching on <strong>Enter a</strong> <strong>pick-up point,</strong> now you have to enter your destination place (Where to?).</li><li>In figure (C): After done with typing the destination place now you have to select a place from the suggestion list.</li><li>In figure (D): After done with selecting one from the suggestion list, you found your estimation of time and cost.</li></ol><p>What interesting about each point is you do all your actions with just one touch and you don’t need to worry about how its happening like when you touched on Enter a pickup point then how the map is opened and how that pointer points to your location? Did you need to know that? What you concern about at that point was to locate my location correctly, and that’s it! and that’s exactly what <strong>Uber App</strong> doing for you (i.e. information hiding).</p><h3>2. What is Encapsulation?</h3><p><strong>Binding of Data and Functions (that manipulate the data) together</strong> and keep both safe from outside interference and misuse is called Encapsulation. Lets try to understand it by taking the following example!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0gLbfuOoyeVR2Md2WT8pdg.jpeg" /></figure><p>Lets try to understand it. Let’s say we have a class called <strong>Mobile </strong>and we have some public functions (public means the function can be called outside from the class) :</p><ul><li>openCamera()</li><li>openClock()</li><li>openCalender()</li><li>openMaps()</li><li>openNotes()</li><li>openAppStore()</li></ul><p>and so on. Above figure shows the comparison of mobile phone with a camera feature (middle one) and another mobile phone with a camera feature including a further feature of zoom in (right one). Let’s talk about openCamera() function. Initially you just have a function which opens camera for you! nothing else. Then you have got a new idea in a shape of (Zoom in) feature. To implement this idea you only have to update your <strong>OpenCamera()</strong> function. The point that needs to understand here is you don’t need to worry about anything outside of this function. You just go to the function, make some changes and BOOM!. That is what Encapsulation offers you (the mechanism of implementing class and function and making things together).</p><h3>2. What is Inheritance?</h3><p>I<strong>nheritance</strong> enables new objects to take on the properties of existing objects. There are different ways in which Inheritance can be done.</p><ul><li>Single Inheritance</li><li>Multi-level Inheritance</li><li>Multiple Inheritance</li><li>Hierarchical Inheritance</li></ul><p>Lets try to understand first type i.e. <strong>Single Inheritance</strong> by taking an example of Facebook Messenger App.</p><h4><strong>1. Single Inheritance</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gjc9ESWKK-jD2ctXS2yr0w.jpeg" /></figure><p>In this type of inheritance, a child class inherits the behavior from parent class so in above example, child class is <strong>GroupCall</strong> class which inherits the behaviors (i.e. startAudioCall() and startVideoCall()) from parent class i.e. <strong>Call. </strong>The point that needs to understand here that instead of defining those method (i.e. startAudioCall() and startVideoCall()) again in GroupCall class, those methods will be inherited from the parent class. So in this way inheritance is done!</p><h4>2. Multi-level Inheritance:</h4><p>In this type of inheritance, a relation of <strong>Grand Parent to Parent to Child</strong> is followed. Let’s try to understand it by taking an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwEk0qBeCTSwe8RlPtVWNw.jpeg" /></figure><p>In this type of inheritance, a child class inherits the behavior from parent class which further inherits from grand parent class. Here child is Primary <strong>Mail</strong>, parent is <strong>Gmail</strong>, and grand parent is <strong>Mail</strong>.</p><h4>3. Multiple Inheritance: (not supported by Java)</h4><p>In this type of inheritance, a relation of <strong>one child with two parents </strong>is followed. Let’s try to understand it by taking an example Instagram Stories:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TfVYb1tGvAVhpIni6_Ehg.jpeg" /></figure><p>Here we have taken an example of Instagram stories, where a class Stories inherits some behavior functions of class Camera and some behavior function of class Filters. so here a child i.e. Stories inherits from one parent (Camera) and another parent (Filters).</p><p>(Multiple Inheritance can be done in java by using Interfaces).</p><h4>4. Hierarchical Inheritance:</h4><p>In this type of Inheritance, A relation of <strong>multiple children of one parent</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAxj2m-Gx-98F5UCug9FnA.jpeg" /></figure><p>As you can see in the figure, we have taken an example of WhatsApp where a message can be send. So Message is a parent here and Text Message and Audio Message and Photo Message are children of Message!</p><h3>4. What is Polymorphism?</h3><p>It is the ability to redefine <em>methods</em> for <em>derived classes.</em> or we can say that object can behave in different forms is call Polymorphism. Lets try to understand it by taking an example of Google Search engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lXYjjzYwST1iMFr3vk2qMQ.jpeg" /></figure><p>Lets try to understand it. When user searches for something (ALLAH HU AKBAR) in this case. so by default <strong>SearchItems ()</strong> of <strong>ALLSearch </strong>class will be called. Similarly when user clicks on Images to see the Image of the search query then <strong>SearchItems()</strong> of <strong>ImageSearch</strong> class will be called. The point that needs to understand here that redefining of function is done here and secondly object of Search class can be appeared in many forms (like object of AllSearch, ImageSearch etc) implementation of the above example in Java can be done as follow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0x8fF2atJwLCe4DEV1VvCQ.jpeg" /></figure><p>If you think it’s worth reading and helped you to think critically, please support me and buy me a coffee here (<a href="https://www.buymeacoffee.com/hamzaahmed9">https://www.buymeacoffee.com/hamzaahmed9</a>)</p><p>Thats it! Happy Coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8d7822aa219" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A BEGINNERS GUIDE TO REACTJS]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/a-beginners-guide-to-reactjs-2b59db83fa18?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b59db83fa18</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[learn-react-js]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Wed, 21 Feb 2018 10:03:55 GMT</pubDate>
            <atom:updated>2023-04-05T10:29:56.157Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. What is React?</h3><p>React is a <strong>front-end JavaScript library</strong> for creating <strong>user interface</strong>. In other words <em>Reactjs </em>is all about <strong>components </strong>like if you think of <em>React </em>then you actually think of c<strong>omponent</strong>.”</p><h3>2. What is Component?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*Ha6FrAlyMXY15bvL_QoCuQ.jpeg" /></figure><p>A <em>component </em>is a small piece of <strong>User Interface</strong>. Let’s try to understand by examining the figure. First of all there is a main component (or parent component) called <strong>APP component. </strong>This App component contains four child components or it is divided into four components:</p><ul><li>Header</li><li>Sidebar</li><li>Content</li><li>Footer</li></ul><p>Each component’s function will be handled independently with other components. Each component is a reusable piece, and you can think about each component in isolation.</p><h4>Youtube Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ROh_TpxpbIKQAesYfZykA.jpeg" /></figure><h4>App component contains three components:</h4><ul><li>Header Component contains (Navbar, Icon, SearchBar, Icons etc)</li><li>Sidebar Component contains (List of Icons, Library, Subscriptions etc..)</li><li>Content Component contains (List of Videos etc )</li></ul><p>so whenever you get the data after searching some video then this data can be handled independently only in <strong>Header Component</strong>.</p><h3>3. What are States and Props?</h3><h3>States:</h3><p>Lets talk about states first,<strong> State is a living variable of an application</strong>.</p><p>There are two types of States:</p><ul><li>Component Level State</li><li>Application Level State (Redux)</li></ul><p>For now, we will discuss the first type i.e. Component Level State and we’ll try to understand it by taking an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GWhismB0CfOxofvkG9uYHw.jpeg" /></figure><p>As you can see we have taken an example of Youtube Search bar here. When you open Youtube and you have to search for something. so initially <strong>Search is empty (i.e. Search=” ”). </strong>Now you search for <strong>Sports Video</strong> so at that time, the value of Search will be <strong>Sports Video (i.e. Search=”Sports Video”) </strong>and all the sports related videos will be shown. Similarly for other two like if you search for <strong>Education Videos</strong> or <strong>Dance Videos</strong> then the respected videos will be shown . Here <strong>Search</strong> is a <strong>state variable</strong>. The point that needs to understand here is you are changing the value of <strong>Search </strong>continuously and for that reason we call it a <strong>Living Variable.</strong></p><h3>Props:</h3><p>Props is something that carries same data throughout its life cycle. Whenever you set the value of props once, it won’t be changed after. Lets understand it by example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkMORgecsiKw8jCwuB1TeA.jpeg" /></figure><p>The picture is divided into two parts. Lets discuss both parts one by one.</p><ul><li>In first picture, two components are highlighted here, <strong>Searchbar component</strong> and <strong>Content Component</strong>. The result of search in <strong>Searchbar component</strong> will be displayed in <strong>content component</strong>. There is a kind of <strong>sending data from one component to another.</strong> This is where props comes into play. The data will not be changed into another component.</li></ul><p>For example if data <strong>A </strong>is sent from Component <strong>A </strong>to Component <strong>B</strong> so that data won’t be changed in Component <strong>B </strong>(lets try to understand it in second part)<strong>.</strong></p><ul><li>In second picture, user searches for <strong>Sports Video. </strong>As a result of this query, <strong>sports data</strong> is ready to send and display in <strong>Content Component</strong> from <strong>Searchbar Component</strong>. As I have discussed before that data won’t be changed like the sports data will not be changed to any other data like Education data etc. The data which is sent from <strong>SearchBar Component</strong> and has to be displayed in <strong>Content Component</strong> is <strong>Sports Video </strong>and it will never change. This whole mechanism will be done by props easily.</li></ul><p>If you think it’s worth reading and helped you to think critically, please support me and buy me a coffee here (<a href="https://www.buymeacoffee.com/hamzaahmed9">https://www.buymeacoffee.com/hamzaahmed9</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b59db83fa18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing a Circle with LinearLayout in Android]]></title>
            <link>https://medium.com/@hamzzza.ahmed95/designing-a-circle-with-linearlayout-in-android-625baa1bf4f6?source=rss-194d5e60ddbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/625baa1bf4f6</guid>
            <category><![CDATA[user-interface]]></category>
            <category><![CDATA[android-xml]]></category>
            <category><![CDATA[xml]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-design]]></category>
            <dc:creator><![CDATA[Hamza Ahmed (Bidchol)]]></dc:creator>
            <pubDate>Wed, 21 Feb 2018 00:40:43 GMT</pubDate>
            <atom:updated>2023-04-05T10:30:17.294Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*71iHOSP-Cck7pGgh0KMEnQ.png" /></figure><p>LinearLayout always play an important role in structuring a User Interface of an app. LinearLayout does strict all its children in a single direction (i.e. vertically or horizontally). We are designing a circle with a combination of some LinearLayouts in a step by step and in a most easiest way.</p><h4>1. Creating Parent LinearLayout</h4><p>First of all we have to create one LinearLayout which will be our <strong>Parent LinearLayout</strong> and it’s orientation (i.e. how the children of this Layout aligned, vertically or horizontally) is set to be “Vertical” because It will have 3 three vertical children.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZoTSOAEL2XNpA9-6TtT-g.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*I64Ddz04lfOXLQ_BA1DhtA.png" /></figure><h4>2. Creating Three Vertical LinearLayouts</h4><p>After done with the first step, now we have to create three LinearLayouts inside of Parent Layout. As you can see in the figure, first LinearLayout contains Futsal , Cricket and Basketball. Second LinearLayout contains Badminton, FLOG and FFT. And similarly third LinearLayout contains Volley, Throw, Table. All three layouts are aligned vertically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jyVMwSH61VEURu5bjCRhUQ.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*f9Fy6I-zts8Brb2AHOUPgw.png" /></figure><h4>3. Creating Three Horizontal LinearLayouts</h4><p>After done with creating three V<strong>ertical LinearLayouts</strong>, now for each<strong> Vertical LinearLayouts</strong> we will create three<strong> Horizontal LinearLayouts </strong>which means there will be total nine <strong>Horizontal LinearLayouts</strong>, three for each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-rm75PMTe3KxUMn6fsr-w.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*3yAhjWG8EO0L-BeoXO_-4w.png" /></figure><h4>4. Creating Two Vertical LinearLayouts</h4><p>At last each <strong>Horizontal LinearLayout</strong> contains two children as you can see below in figure. First child is the image or icon of the sports wrapped in LinearLayout and the second child is the name of the sports (i.e. TextView). This will follow for all the nine Horizontal LinearLayouts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtrTGtgNg6wyA5Wg3SWhCg.jpeg" /></figure><h4>Code:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*87yljwgQ0tGbITH94ZkTBA.png" /></figure><h4>5. Set Padding to our LinearLayouts.</h4><p>After following all the four steps, our UI will look like as figure <strong>A </strong>(i.e. haven’t set any padding) But after applying the padding it will be a perfect circle! (THINK IN CREATIVE WAY). Circle 2, 5 and 8 won’t change their position so no padding will be applied on these Layouts. <strong>PaddingTop </strong>applied on Circle 1 and 3, <strong>PaddingBottom </strong>applied on Circle 7 and 9, <strong>PaddingLeft </strong>applied to circle 6 and <strong>PaddingRight </strong>applied to circle 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9jwu-7wR27eEkSGLxEE_Qg.jpeg" /></figure><p>If you think it’s worth reading and helped you to think critically, please support me and buy me a coffee here (<a href="https://www.buymeacoffee.com/hamzaahmed9">https://www.buymeacoffee.com/hamzaahmed9</a>)</p><p>Thank you! (Happy Coding)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=625baa1bf4f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>