<?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: Pete</title>
    <description>The latest articles on DEV Community by Pete (@petemode).</description>
    <link>https://dev.to/petemode</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%2F414376%2Faf16caf1-f741-4a7e-8393-086f83ccadc9.JPG</url>
      <title>DEV Community: Pete</title>
      <link>https://dev.to/petemode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/petemode"/>
    <language>en</language>
    <item>
      <title>WebRTC For Beginners. Part 1</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Tue, 30 Sep 2025 00:58:56 +0000</pubDate>
      <link>https://dev.to/petemode/webrtc-for-beginners-part-1-pc4</link>
      <guid>https://dev.to/petemode/webrtc-for-beginners-part-1-pc4</guid>
      <description>&lt;p&gt;WebRTC is an open source project that enables peer-to-peer communication between browsers or applications.&lt;br&gt;
WebRTC enables two internet clients to exchange any kind of media through the web without any plugin or framework. Whether the media type is audio, video or any other kind of data, it doesn't matter. WebRTC will enable two clients to exchange data seamlessly.&lt;/p&gt;

&lt;p&gt;WebRTC is currently being used by many well-known applications, including but not limited to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Meet&lt;/li&gt;
&lt;li&gt;Google Hangouts&lt;/li&gt;
&lt;li&gt;Facebook Messenger&lt;/li&gt;
&lt;li&gt;Discord&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Components Of A WebRTC System
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07zk9ktv0tkva7get45u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07zk9ktv0tkva7get45u.png" alt="Components of a WebRTC system" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The basic components of any WebRTC system are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Signaling Server&lt;/li&gt;
&lt;li&gt;STUN Server&lt;/li&gt;
&lt;li&gt;TURN Server&lt;/li&gt;
&lt;li&gt;Client&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Signaling Server
&lt;/h3&gt;

&lt;p&gt;A signaling server is a server that clients use to exchange necessary information about each other. The clients use this exchanged information to establish a connection between themselves.&lt;br&gt;
The process of exchanging information is called signaling and signaling can be done using Websocket or XMLHttpRequest&lt;/p&gt;

&lt;h3&gt;
  
  
  STUN Server
&lt;/h3&gt;

&lt;p&gt;STUN stands for &lt;strong&gt;Session Traversal Utilities for NAT&lt;/strong&gt;. A stun server allows a client to request information about their public address and the type of NAT they are behind. This information is part of the data sent to the signaling server.&lt;/p&gt;

&lt;p&gt;So the way STUN servers fit into this flow is that the client asks the STUN server for information, the STUN server responds with the information, and then the client sends that information to the signaling server&lt;/p&gt;

&lt;h3&gt;
  
  
  TURN Server
&lt;/h3&gt;

&lt;p&gt;TURN stands for &lt;strong&gt;Traversal Using Relay NAT&lt;/strong&gt;.&lt;br&gt;
It is a protocol for relaying network traffic. In 15 to 20% of cases, the stun server can fail to provide information to client. If that happens, it won't be possible for the clients to set up a peer-to-peer connection with each other.&lt;br&gt;
Cases like that are where the TURN server comes in.&lt;br&gt;
If a peer-to-peer connection can not be established, A TURN server is used to connect the clients to each other. In this case, instead of exchanging data directly, the clients will send data to each other but the data will pass through the TURN server.&lt;/p&gt;

&lt;p&gt;You can look at the diagram above for more clarity.&lt;/p&gt;

&lt;p&gt;Basically, a TURN server acts as a fallback or backup communication channel in cases where the peer-to-peer connection can not be created.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;There are usually two clients involved in a WebRTC connection but for us to understand how things work a lot more easily, I'll explain the processes that are involved from the perspective of one client - not two.&lt;/p&gt;

&lt;p&gt;First off, we must know the types of data that a client sends to the signaling server. They are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Multimedia communication sessions using &lt;strong&gt;SDP&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;ICE Candidates&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don't get overwhelmed by these terms. As you have probably already discovered, verbose terms in computer science always refer to very simple concepts. I don't know why computer science just chooses to embrace verbosity, but I know that the underlying concepts are usually simplistic.&lt;/p&gt;

&lt;h3&gt;
  
  
  SDP
&lt;/h3&gt;

&lt;p&gt;SDP stands for Session Description Protocol. SDP is a format for describing properties of the media you want to exchange like video and audio codecs, source addresses and timing information of audio and video. These properties of the media are called multimedia communication sessions and they are used for creating WebRTC offers and session invitations&lt;/p&gt;

&lt;p&gt;SDP is not used to deliver the actual media. It is just used to tell the signaling server and the other client what kind of media you want to exchange.&lt;/p&gt;

&lt;p&gt;It is important to note that the data sent using SDP does not come from the STUN server. It comes from the client itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  ICE Candidates
&lt;/h3&gt;

&lt;p&gt;ICE Candidates hold information about a client's internet connection.&lt;br&gt;
The ICE Candidate is fetched from the STUN Server and it contains information like the client's IP address and the available methods the peers will use to communicate(either directly or through a TURN server)&lt;/p&gt;

&lt;p&gt;In essence, the process of signalling is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Client sends info to the signaling server using SDP&lt;/li&gt;
&lt;li&gt;Client asks STUN server for ICE Candidate&lt;/li&gt;
&lt;li&gt;STUN Server sends ICE candidate to client&lt;/li&gt;
&lt;li&gt;Client sends ICE Candidate to signaling server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each of these steps is also repeated on the receiving client's end. So the final flow diagram for establishing a connection would, in essence, look like this👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foor5jseqtrcgvhl7u6rl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foor5jseqtrcgvhl7u6rl.png" alt="A successful p2p connection" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👆 A successful p2p connection&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijd9dda65nneh9msrv30.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijd9dda65nneh9msrv30.png" alt="A fallback connection with a TURN server" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👆 A fallback connection with a TURN server&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>webrtc</category>
      <category>learning</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Running Spring Boot Applications With Gradle and Maven</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Thu, 17 Oct 2024 09:56:50 +0000</pubDate>
      <link>https://dev.to/petemode/running-spring-boot-applications-with-gradle-and-maven-2lgp</link>
      <guid>https://dev.to/petemode/running-spring-boot-applications-with-gradle-and-maven-2lgp</guid>
      <description>&lt;p&gt;You can either run a Spring Boot application or build a jar from it. You can do both with either Gradle or Maven&lt;/p&gt;

&lt;h3&gt;
  
  
  Gradle
&lt;/h3&gt;

&lt;p&gt;The command for running a Spring Boot app with Gradle is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./gradlew bootRun&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The command for building a jar from a Spring Boot application is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./gradlew build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The command for running a jar is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;java -jar build/libs/&amp;lt;jar_filename&amp;gt;.jar&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the above command for running the jar, the jar filename refers to the name of the jar file including its version number but not including its .jar file extension and not including its full path.&lt;/p&gt;

&lt;h3&gt;
  
  
  Maven
&lt;/h3&gt;

&lt;p&gt;The command for running a Spring Boot app with Maven is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./mvnw spring-boot:run&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The command for building a jar from a Spring Boot application with Maven is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./mvnw clean package&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The command for running a jar is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;java -jar build/libs/&amp;lt;jar_filename&amp;gt;.jar&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When you run a Maven build, it runs your tests before producing the final output. If any tests fail, the build will fail.&lt;/p&gt;

&lt;h3&gt;
  
  
  Jar Locations in Gradle and Maven
&lt;/h3&gt;

&lt;p&gt;When you build a jar with Gradle, the JAR file is stored in /build/libs/ while when you build the JAR with Maven, it is stored in /target&lt;/p&gt;

&lt;p&gt;P.S. The app is much faster when you run the JAR than when you do a regular run.&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>java</category>
      <category>kotlin</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Spring Boot Controllers Basics</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Mon, 14 Oct 2024 10:16:11 +0000</pubDate>
      <link>https://dev.to/petemode/spring-boot-controllers-basics-2eoa</link>
      <guid>https://dev.to/petemode/spring-boot-controllers-basics-2eoa</guid>
      <description>&lt;p&gt;In Spring Boot, a controller is a class that contains methods that process HTTP requests. A controller is created by annotating a class with RestController.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
public class ExampleController {
    private ExampleRepository exampleRepository;
    private static final String template = "Hello, %s!";

    @GetMapping("/examples/{requestedId}")
    public ResponseEntity&amp;lt;Example&amp;gt; findById(@PathVariable Long requestedId) {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;GetMapping&lt;/code&gt; annotation is used to route all GET requests that match a string pattern to a method in a controller. In the code example you just looked at, the &lt;code&gt;GetMapping&lt;/code&gt; annotation was used to route all GET requests to the URL /examples/* to the &lt;code&gt;findById&lt;/code&gt; method. With this code, when a request is sent to /examples/, the &lt;code&gt;findById&lt;/code&gt; method will be called.&lt;/p&gt;

&lt;h3&gt;
  
  
  RequestMapping
&lt;/h3&gt;

&lt;p&gt;There are other annotations for other request methods like &lt;code&gt;PostMapping&lt;/code&gt; and &lt;code&gt;DeleteMapping&lt;/code&gt;. They are all derived from the parent annotation &lt;code&gt;RequestMapping&lt;/code&gt; and you can use &lt;code&gt;RequestMapping&lt;/code&gt; in their place, although, when you use &lt;code&gt;RequestMapping&lt;/code&gt; you have to specify the HTTP method it is supposed to handle&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
public class ExampleController {
    private ExampleRepository exampleRepository;
    private static final String template = "Hello, %s!";

    @RequestMapping(method="GET", path="/examples/{requestedId}")
    public ResponseEntity&amp;lt;Example&amp;gt; findById(@PathVariable Long requestedId) {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;RequestMapping&lt;/code&gt; is most commonly used to specify the URLs that you want a &lt;code&gt;RestController&lt;/code&gt; to handle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
@RequestMapping("/api/v1/examples")  // This is the base path
public class ExampleController {
    @GetMapping
    public String getAllExamples() {
    }

    @GetMapping("/{id}")
    public String getExampleById(@PathVariable("id") Long id) {
    }

    @PostMapping
    public String createExample() {
    }

    @DeleteMapping("/{id}")
    public String deleteExample(@PathVariable("id") Long id) {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code snippet above, by annotating the &lt;code&gt;RestController&lt;/code&gt; class with &lt;code&gt;RequestMapping&lt;/code&gt;, the url /api/v1/examples acts as a prefix for all the routes within the class. This means the &lt;code&gt;getExampleById&lt;/code&gt; method that has a &lt;code&gt;GetMapping&lt;/code&gt; of /{id} actually has a &lt;code&gt;GetMapping&lt;/code&gt; of /api/v1/examples/{id} and the same applies to every single method in this class that has a &lt;code&gt;RequestMapping&lt;/code&gt; associated with it.&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>backenddevelopment</category>
      <category>java</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Spring Boot Controllers Basics</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Mon, 14 Oct 2024 10:16:11 +0000</pubDate>
      <link>https://dev.to/petemode/spring-boot-controllers-basics-29ef</link>
      <guid>https://dev.to/petemode/spring-boot-controllers-basics-29ef</guid>
      <description>&lt;p&gt;In Spring Boot, a controller is a class that contains methods that process HTTP requests. A controller is created by annotating a class with RestController.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
public class ExampleController {
    private ExampleRepository exampleRepository;
    private static final String template = "Hello, %s!";

    @GetMapping("/examples/{requestedId}")
    public ResponseEntity&amp;lt;Example&amp;gt; findById(@PathVariable Long requestedId) {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;GetMapping&lt;/code&gt; annotation is used to route all GET requests that match a string pattern to a method in a controller. In the code example you just looked at, the &lt;code&gt;GetMapping&lt;/code&gt; annotation was used to route all GET requests to the URL /examples/* to the &lt;code&gt;findById&lt;/code&gt; method. With this code, when a request is sent to /examples/, the &lt;code&gt;findById&lt;/code&gt; method will be called.&lt;/p&gt;

&lt;h3&gt;
  
  
  RequestMapping
&lt;/h3&gt;

&lt;p&gt;There are other annotations for other request methods like &lt;code&gt;PostMapping&lt;/code&gt; and &lt;code&gt;DeleteMapping&lt;/code&gt;. They are all derived from the parent annotation &lt;code&gt;RequestMapping&lt;/code&gt; and you can use &lt;code&gt;RequestMapping&lt;/code&gt; in their place, although, when you use &lt;code&gt;RequestMapping&lt;/code&gt; you have to specify the HTTP method it is supposed to handle&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
public class ExampleController {
    private ExampleRepository exampleRepository;
    private static final String template = "Hello, %s!";

    @RequestMapping(method="GET", path="/examples/{requestedId}")
    public ResponseEntity&amp;lt;Example&amp;gt; findById(@PathVariable Long requestedId) {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;RequestMapping&lt;/code&gt; is most commonly used to specify the URLs that you want a &lt;code&gt;RestController&lt;/code&gt; to handle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
@RequestMapping("/api/v1/examples")  // This is the base path
public class ExampleController {
    @GetMapping
    public String getAllExamples() {
    }

    @GetMapping("/{id}")
    public String getExampleById(@PathVariable("id") Long id) {
    }

    @PostMapping
    public String createExample() {
    }

    @DeleteMapping("/{id}")
    public String deleteExample(@PathVariable("id") Long id) {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code snippet above, by annotating the &lt;code&gt;RestController&lt;/code&gt; class with &lt;code&gt;RequestMapping&lt;/code&gt;, the url /api/v1/examples acts as a prefix for all the routes within the class. This means the &lt;code&gt;getExampleById&lt;/code&gt; method that has a &lt;code&gt;GetMapping&lt;/code&gt; of /{id} actually has a &lt;code&gt;GetMapping&lt;/code&gt; of /api/v1/examples/{id} and the same applies to every single method in this class that has a &lt;code&gt;RequestMapping&lt;/code&gt; associated with it.&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>backenddevelopment</category>
      <category>java</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>CSS Positioning</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Sun, 16 Oct 2022 12:55:04 +0000</pubDate>
      <link>https://dev.to/petemode/css-positioning-3g8e</link>
      <guid>https://dev.to/petemode/css-positioning-3g8e</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box {
  position: relative;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The position of an HTML element can either be &lt;strong&gt;static&lt;/strong&gt;, &lt;strong&gt;relative&lt;/strong&gt;, &lt;strong&gt;absolute&lt;/strong&gt; or &lt;strong&gt;fixed&lt;/strong&gt;. And recently, &lt;strong&gt;sticky&lt;/strong&gt; has been added to the mix.&lt;br&gt;
You can set the position of an element with the CSS property &lt;strong&gt;position&lt;/strong&gt;&lt;br&gt;
The &lt;strong&gt;position&lt;/strong&gt; property works together with the properties &lt;strong&gt;top&lt;/strong&gt;, &lt;strong&gt;right&lt;/strong&gt;, &lt;strong&gt;bottom&lt;/strong&gt;, and &lt;strong&gt;left&lt;/strong&gt;. I'll call them &lt;em&gt;co-ordinate properties&lt;/em&gt;. Co-ordinate properties function like margin properties and when I start explaining the different types of positioning, you'll understand it even more.&lt;/p&gt;
&lt;h1&gt;
  
  
  Relative Positioning
&lt;/h1&gt;

&lt;p&gt;You can position an element relatively by giving its &lt;strong&gt;position&lt;/strong&gt; property the value of &lt;em&gt;relative&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box {
  position: relative;
  top: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When an element is positioned relatively, it is shifted from where it is originally supposed to be by 0px. This means its new position is relative to its old position. If you add a co-ordinate property like &lt;code&gt;top: 20px&lt;/code&gt;, it is shifted in such a way that it will have a top margin of 20px from its original position.&lt;/p&gt;

&lt;p&gt;When it moves to its new position, the elements around it don't re-arrange themselves to adjust to its new position. They stay put, behaving as if the relatively-positioned element is still in its original position.&lt;/p&gt;

&lt;p&gt;You can add other co-ordinate properties to the element that is positioned relatively like the property &lt;strong&gt;left&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.relative-box {
  position: relative:
  top: 20px;
  left: 30px
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code snippet above will make the element with class &lt;code&gt;relative-box&lt;/code&gt; to move down by 20px and move right by 30px so that it will have a top margin of 20px and a left margin of 30px from its original position.&lt;/p&gt;

&lt;p&gt;Note that to a relatively-positioned element, if you add a &lt;em&gt;top&lt;/em&gt; property, the element moves &lt;strong&gt;down&lt;/strong&gt;; if you add a &lt;em&gt;left&lt;/em&gt; property, the element moves &lt;strong&gt;right&lt;/strong&gt; and the same applies to the other co-ordinate properties.&lt;/p&gt;

&lt;h1&gt;
  
  
  Absolute Positioning
&lt;/h1&gt;

&lt;p&gt;You can position an element absolutely by giving its &lt;strong&gt;position&lt;/strong&gt; property the value of &lt;em&gt;absolute&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.absolute-box {
  position: absolute;
  top: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Absolute positioning works similarly to relative positioning. It works together with co-ordinate properties. There are just a few differences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Differences between absolute and relative positioning&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Relatively positioned elements are positioned relative to their original position but absolutely positioned elements are positioned relative to the HTML's body tag(&lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;If you don't set any top, left, bottom or right properties on &lt;code&gt;.relative-box&lt;/code&gt;, the element will stay in its original position but if you don't set any of those properties on .absolute-box, you will find &lt;code&gt;.absolute-box&lt;/code&gt; at the top-left corner of the page.&lt;/p&gt;

&lt;p&gt;When you position an element absolutely, the other elements in the page will re-arrange themselves to adjust to the new position of the element in the page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This means that when you add a co-ordinate property to set its margin, the element will have that margin but the margin will be from the edge of the page, and not from its original position.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.absolute-box {
  position: absolute;
  top: 10px;
  left: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code snippet above will make the element &lt;code&gt;.absolute-box&lt;/code&gt; to have a top margin of 10px from the top of the page and a left margin of 20px from the left of the page.&lt;/p&gt;

&lt;p&gt;Absolute positioning has another important behavior. You can use absolute positioning to position an element relative to another element. &lt;/p&gt;

&lt;p&gt;If the parent of &lt;code&gt;.absolute-box&lt;/code&gt; is relatively positioned, &lt;code&gt;.absolute-box&lt;/code&gt; will be positioned relative to that parent.&lt;br&gt;
This means that &lt;code&gt;.absolute-box&lt;/code&gt; will have a top margin of 10px from the top edge of its parent and a left margin of 20px from the left edge of its parent.&lt;/p&gt;

&lt;p&gt;Long story short, an element that is positioned absolutely will be relative to the body of the page but if it is inside a parent element that is positioned relatively, it will be positioned relative to that parent.&lt;/p&gt;

&lt;h1&gt;
  
  
  Fixed Positioning
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.fixed-box {
  position: fixed;
  top: 5px;
  left: 10px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An element with a fixed position will be placed in a position &lt;strong&gt;relative to the browser window&lt;/strong&gt;. It is taken out of the flow of the page completely and it will not scroll along with the page. It will stay fixed at a particular point.&lt;/p&gt;

&lt;p&gt;The element with class &lt;code&gt;fixed-box&lt;/code&gt; will have a top margin of 5px from the top of the browser window and a left margin of 10px from the left of the browser window.&lt;/p&gt;

&lt;p&gt;If you don't add any &lt;strong&gt;top&lt;/strong&gt;, &lt;strong&gt;left&lt;/strong&gt;, &lt;strong&gt;bottom&lt;/strong&gt; or &lt;strong&gt;right&lt;/strong&gt; properties, you'll find &lt;code&gt;fixed-box&lt;/code&gt; at the top-left corner of the browser window.&lt;/p&gt;

&lt;p&gt;When you give an element a fixed position, the other elements on the page will re-arrange themselves in response to the fixed element being removed from the page.&lt;/p&gt;

&lt;h1&gt;
  
  
  Static positioning
&lt;/h1&gt;

&lt;p&gt;All HTML elements are positioned statically by default. Static is the default position of HTML elements on the page.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Easy Way To Do Basic CSS Animations</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Tue, 04 Oct 2022 20:54:16 +0000</pubDate>
      <link>https://dev.to/petemode/the-easy-way-to-do-basic-css-animations-4ijp</link>
      <guid>https://dev.to/petemode/the-easy-way-to-do-basic-css-animations-4ijp</guid>
      <description>&lt;p&gt;Do animations run automatically once the page loads? YES.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Animation&lt;/strong&gt; in CSS sounds like a cool thing that manages to be complex at the same time, but an animation is just a change of a CSS property(e.g &lt;code&gt;height&lt;/code&gt;) from one value to another. Simple.&lt;/p&gt;

&lt;h1&gt;
  
  
  Defining Animations
&lt;/h1&gt;

&lt;p&gt;To define a CSS animation, you must specify some keyframes. A keyframe just contains the styles the element you want to animate will have at different times.&lt;br&gt;
You also use keyframes to define the name of an animation. Look at the code snippet below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes demo-animation {
  from {
    height: 24px;
  }
  to {
    height: 48px;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Code breakdown
&lt;/h2&gt;

&lt;p&gt;The code snippet above will animate the height of any element from 24px to 48px and the animation's name will be &lt;em&gt;demo-animation&lt;/em&gt;&lt;br&gt;
In other words, when the animation starts, the height of the element you animate will be 24px and when the animation ends the height will be 48px.&lt;/p&gt;
&lt;h1&gt;
  
  
  Applying an Animation To an Element
&lt;/h1&gt;

&lt;p&gt;If we want to use the animation we defined on an element with an id &lt;em&gt;animated-element&lt;/em&gt;, we simply set the element's &lt;code&gt;animation-name&lt;/code&gt; property to &lt;code&gt;demo-animation&lt;/code&gt; (the name of the animation that we defined with keyframes).&lt;br&gt;
Look at the code snippet below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#animated-element {
  animation-name: demo-animation;
  animation-duration: 2s;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Code breakdown
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;animation-name&lt;/code&gt; is a CSS property whose value must be a CSS animation that has been defined somewhere with keyframes&lt;/p&gt;

&lt;p&gt;&lt;code&gt;demo-animation&lt;/code&gt; is the name of the animation. That's what we are passing to &lt;code&gt;animation-name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;animation-duration&lt;/code&gt; is another CSS property that dictates how long the animation will last. Setting it to 2s means that when the animation starts, the height of the element will be 24px and after two seconds, the height of the element will be 48px.&lt;/p&gt;

&lt;p&gt;There are other properties you can assign to an element that affect how the animation you have defined will be run. They include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;animation-delay&lt;/code&gt; - the amount of time to wait before the animation starts running.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;animation-iteration-count&lt;/code&gt; - the number of times the animation should run.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;animation-direction&lt;/code&gt; - whether the animation should play from start-to-end or from end-to-start. Its values are &lt;code&gt;normal&lt;/code&gt;(default), &lt;code&gt;reverse&lt;/code&gt;, &lt;code&gt;alternate&lt;/code&gt; and &lt;code&gt;alternate-reverse&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can look the other properties up on &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/animation" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note that animation properties(CSS properties that start with "animation-") are not to be used inside keyframes. They are to be used inside the style ruleset of the HTML element or elements you want to animate.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>programming</category>
    </item>
    <item>
      <title>Using Fragments Dynamically</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Fri, 23 Sep 2022 10:41:33 +0000</pubDate>
      <link>https://dev.to/petemode/using-fragments-dynamically-3df9</link>
      <guid>https://dev.to/petemode/using-fragments-dynamically-3df9</guid>
      <description>&lt;p&gt;One difference between the lifecycle methods of activities and fragments is in their access modifiers. Activity lifecycle methods are &lt;em&gt;protected&lt;/em&gt; while Fragment lifecycle methods are &lt;em&gt;public&lt;/em&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  The First Problem With Fragments
&lt;/h1&gt;

&lt;p&gt;In fragments, adding the &lt;code&gt;onClick&lt;/code&gt; property to a button or any subclass of the &lt;code&gt;Button&lt;/code&gt; class does not work the expected way.&lt;br&gt;
When you add the &lt;code&gt;onClick&lt;/code&gt; property in a fragment, android looks for the callback method in the fragment's parent activity, and if the method isn't there, the app crashes(even if the method is in the Fragment class).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution???&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can try to solve this problem by moving the fragment's methods into the parent activity. That solution would work but its side effect would be that if you wanted to reuse the fragment in another activity, you would have to declare the same methods in that activity.&lt;/p&gt;

&lt;p&gt;You want your fragments to be self-contained so that won't be recommended. Like every programming problem, there is a solution somewhere. You just have to find it.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Real Solution
&lt;/h1&gt;

&lt;p&gt;To be able to define your onClick handler methods in your fragment, you can take these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make your Fragment class implement the &lt;code&gt;View.OnClickListener&lt;/code&gt; interface.&lt;/li&gt;
&lt;li&gt;Override the fragment's &lt;code&gt;onClick&lt;/code&gt; method and use an if-else or a switch to give it different callbacks depending on the &lt;strong&gt;id&lt;/strong&gt; of the view that was clicked.
3 For every button you want to handle, attach the onClick listener to it with &lt;code&gt;button.setOnClickListener(this)&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;
  
  
  The Second Problem With Fragments
&lt;/h1&gt;

&lt;p&gt;A dynamic fragment's state does not survive configuration changes if it is nested into an activity's layout with the &lt;code&gt;&amp;lt;fragment/&amp;gt;&lt;/code&gt; tag. However, it survives if it is added to the activity with a &lt;code&gt;FragmentTransaction&lt;/code&gt; and a little tweak.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Little Tweak
&lt;/h1&gt;

&lt;p&gt;The tweak is adding a fragment to a FrameLayout dynamically and doing that only if the activity is being created from scratch so that you won't overlay a fragment that is being recreated.&lt;/p&gt;

&lt;p&gt;Doing this is very simple. Add code to the &lt;code&gt;onCreate&lt;/code&gt; method of the activity that checks if the &lt;code&gt;Bundle&lt;/code&gt; named &lt;code&gt;savedInstanceState&lt;/code&gt; is null.&lt;br&gt;
If the bundle is null, it means the activity is being created from scratch. If it isn't null, it means the activity is being recreated.&lt;/p&gt;

&lt;p&gt;Look at the code snippet below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
protected void onCreate(Bundle savedInstanceState) {
  ...
  if (savedInstanceState == null) {
    DemoFragment frag = new DemFragment();
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    transaction.add(R.id.fragment_container, frag);
    transaction.addToBackStack(null);
    transaction.commit();
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code breakdown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This code snippet is used to add a fragment to an activity only if the activity is being created from scratch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DemoFragment&lt;/code&gt; is the name of the fragment class that you must have created somewhere in your code.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;frag&lt;/em&gt; is the name of the &lt;code&gt;Fragment&lt;/code&gt; instance that you want to add to the activity.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;fragment_container&lt;/em&gt; is the id of the &lt;code&gt;FrameLayout&lt;/code&gt; you want to place your fragment in.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;savedInstanceState&lt;/code&gt; is null, it means the activity is being created from scratch, the child fragment has not been rendered yet, and you proceed to add logic for adding the child fragment.&lt;/p&gt;

&lt;p&gt;Be sure to notice how the onCreate method's access modifier is &lt;em&gt;protected&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://dev.to/petemode/switching-fragments-with-code-k8f"&gt;Previous article: Switching Fragments With Code&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Next article: Displaying Nested Fragments&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>android</category>
      <category>kotlin</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Switching Fragments With Code</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Mon, 12 Sep 2022 11:21:26 +0000</pubDate>
      <link>https://dev.to/petemode/switching-fragments-with-code-k8f</link>
      <guid>https://dev.to/petemode/switching-fragments-with-code-k8f</guid>
      <description>&lt;p&gt;&lt;code&gt;FragmentTransaction&lt;/code&gt; is a class that enables us to add and remove fragments programatically. It works with the backstack just like the one activities use. All we need is a &lt;code&gt;ViewGroup&lt;/code&gt; to hold the fragments.&lt;/p&gt;

&lt;p&gt;I'm going to list the steps required to work with &lt;code&gt;FragmentTransaction&lt;/code&gt; instances. All the code snippets I'll write down will base on the assumption that in our layout xml file there is a &lt;code&gt;FrameLayout&lt;/code&gt; with an id of &lt;em&gt;fragmentcontainer&lt;/em&gt; that contains or will contain the fragments we will transact with and that the reference to the new fragment is named &lt;em&gt;newFragment&lt;/em&gt;. &lt;br&gt;
The steps required are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;FragmentTransaction&lt;/code&gt; instance in your activity.&lt;/li&gt;
&lt;li&gt;Specify the changes the transaction should include.&lt;/li&gt;
&lt;li&gt;Add the transaction to the backstack.&lt;/li&gt;
&lt;li&gt;Commit the transaction.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's look at each of these steps in detail.&lt;/p&gt;
&lt;h1&gt;
  
  
  Creating a fragment transaction
&lt;/h1&gt;

&lt;p&gt;Fragment transactions are created inside activities. To create a &lt;code&gt;FragmentTransaction&lt;/code&gt;, you call the method &lt;code&gt;beginTransaction()&lt;/code&gt; on the result of calling &lt;code&gt;getSupportFragmentManager()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can create a &lt;code&gt;FragmentTransaction&lt;/code&gt; with the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Specifying Changes in a Fragment Transaction
&lt;/h1&gt;

&lt;p&gt;There are different changes a &lt;code&gt;FragmentTransaction&lt;/code&gt; can contain. Each change is specified by a method. Some of these methods are &lt;code&gt;add()&lt;/code&gt;, &lt;code&gt;replace()&lt;/code&gt;, and &lt;code&gt;remove()&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  add() and replace()
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;add()&lt;/code&gt; method adds a new fragment to the backstack. The code snippet below shows how to use the method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.add(R.id.fragmentcontainer, newFragment);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;replace()&lt;/code&gt; method replaces the existing fragment with a new one. The code snippet below shows how to use the method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.replace(R.id.fragmentcontainer, newFragment);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code breakdown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;add()&lt;/code&gt; and &lt;code&gt;replace()&lt;/code&gt; methods take two arguments. They are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The id of the &lt;code&gt;ViewGroup&lt;/code&gt; that contains the fragment &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The new fragment that you want to add or replace the old fragment with.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the code snippets above, &lt;em&gt;transaction&lt;/em&gt; is a &lt;code&gt;FragmentTransaction&lt;/code&gt; instance, &lt;em&gt;fragmentcontainer&lt;/em&gt; is the id of the ViewGroup in our activity that contains the fragment, and &lt;em&gt;newFragment&lt;/em&gt; is a reference to the new fragment that we want to add to the backstack or replace the current one with.&lt;/p&gt;

&lt;h2&gt;
  
  
  remove()
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;remove()&lt;/code&gt; method removes a fragment from the fragment backstack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.remove(currentFragment);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code breakdown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The remove method takes one argument -  a reference to the fragment we want to remove. The code snippet above will remove the fragment referenced by &lt;em&gt;currentFragment&lt;/em&gt; from the backstack.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding a FragmentTransaction to the Backstack
&lt;/h1&gt;

&lt;p&gt;You add a FragmentTransaction to the backstack with the method &lt;code&gt;addToBackStack()&lt;/code&gt;.&lt;br&gt;
This method takes one argument - a string that you use to label the transaction in case you need to retrieve the transaction programatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.addToBackstack("transaction_id");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code above, the string "transaction_id" can be used later to retrieve the transaction. You can also pass null into the &lt;code&gt;addToBackStack()&lt;/code&gt; method if you don't want to pass a string.&lt;/p&gt;

&lt;h1&gt;
  
  
  Committing a Transaction
&lt;/h1&gt;

&lt;p&gt;You commit a FragmentTransaction by calling the method &lt;code&gt;commit()&lt;/code&gt; on the transaction instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.commit();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you call &lt;code&gt;commit()&lt;/code&gt;, the changes you saved in the &lt;code&gt;FragmentTransaction&lt;/code&gt; are applied to your application.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;To switch fragments programatically, take these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;FragmentTransaction&lt;/code&gt; in your activity.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Specify the changes the transaction should include.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.add(R.id.fragmentcontainer, newFragment);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add the transaction to the backstack.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.addToBackstack("transaction_id");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Commit the transaction.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transaction.commit();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://dev.to/petemode/list-fragments-2ppg"&gt;Previous article: List Fragments&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Coming up next: Dynamic Fragments&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>tutorial</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>List Fragments</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Thu, 08 Sep 2022 20:11:55 +0000</pubDate>
      <link>https://dev.to/petemode/list-fragments-2ppg</link>
      <guid>https://dev.to/petemode/list-fragments-2ppg</guid>
      <description>&lt;p&gt;&lt;code&gt;ListFragment&lt;/code&gt; is a subclass of the &lt;code&gt;Fragment&lt;/code&gt; class. List fragments are fragments that extend the &lt;code&gt;ListFragment&lt;/code&gt; class. Fragments like this have special methods for working with lists and adapters, they do not need a layout file because they automatically have their own layout, and they have just one root view - a &lt;code&gt;ListView&lt;/code&gt;. Modern list fragments can have a &lt;code&gt;GridView&lt;/code&gt; though.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a ListFragment
&lt;/h1&gt;

&lt;p&gt;When you create a &lt;code&gt;ListFragment&lt;/code&gt; subclass, you won't need to override &lt;code&gt;onCreateView()&lt;/code&gt; unless you want to add some custom behavior to it.&lt;br&gt;
If you want to override it however, you'll have to call &lt;code&gt;super()&lt;/code&gt; in the method body.&lt;br&gt;
Let's create a list fragment named &lt;em&gt;DemoListFragment&lt;/em&gt; and override &lt;code&gt;onCreateView()&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class DemoListFragment extends ListFragment {
    @Override
    public View onCreateview(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflate, container, savedInstanceState);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code breakdown&lt;/strong&gt;&lt;br&gt;
In the &lt;code&gt;onCreateView&lt;/code&gt; method, we did not inflate an xml layout file. This is because list fragments have their own layout automatically and so we don't need to inflate our own xml file.&lt;/p&gt;
&lt;h1&gt;
  
  
  Binding Data to ListFragments
&lt;/h1&gt;

&lt;p&gt;In list fragments, you bind data to their &lt;code&gt;ListViews&lt;/code&gt; with adapters just like in activities, but there are two major differences. They are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The constructor of an &lt;code&gt;Adapter&lt;/code&gt; usually takes a &lt;code&gt;Context&lt;/code&gt; argument. If you were constructing the &lt;code&gt;Adapter&lt;/code&gt; in an activity, you would have passed it &lt;code&gt;this&lt;/code&gt; as the &lt;code&gt;Context&lt;/code&gt; argument because activities implement &lt;code&gt;Context&lt;/code&gt;. 
But since the adapter is getting constructed in a fragment(an object that doesn't implement Context), you have to get the context from somewhere else. You have to pass it the result of calling &lt;code&gt;getContext()&lt;/code&gt; on the &lt;code&gt;LayoutInflater&lt;/code&gt; object.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Assuming you want to create an &lt;code&gt;ArrayAdapter&lt;/code&gt; named &lt;em&gt;adapter&lt;/em&gt;, for an array named &lt;em&gt;demoArray&lt;/em&gt; and the layout for one list item is defined in the file &lt;em&gt;list_item.xml&lt;/em&gt;, you can do the job with the code snippet below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ArrayAdapter&amp;lt;String&amp;gt; adapter = new ArrayAdapter(inflater.getContext(), android.R.layout.list_item, demoArray);
setListAdapter(adapter);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;We use &lt;code&gt;setListAdapter()&lt;/code&gt; to set the adapter, and not &lt;em&gt;&lt;/em&gt;.setAdapter(). That is because ListFragments already have a built-in reference to the list that you want to bind the adapter to. So you don't need to call it explicitly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Responding to Clicks in the List Fragment
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;ListFragment&lt;/code&gt; implements a listener automatically so you just have to implement the method &lt;code&gt;onListItemClick()&lt;/code&gt; to respond to clicks.&lt;br&gt;
You can implement &lt;code&gt;onListItemClick()&lt;/code&gt; the default way - just by adding custom code to it - but it will make your &lt;code&gt;Fragment&lt;/code&gt; tightly coupled to your activity. To achieve loose coupling, you'll have to go extra steps. These steps are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create an interface named &lt;code&gt;Listener&lt;/code&gt; that has a handler method named &lt;code&gt;itemClicked()&lt;/code&gt;. Any activity that we want to respond to clicks will implement the interface and override its method.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static interface Listener {
    void itemClicked(long id);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Create a private field inside the &lt;code&gt;ListFragment&lt;/code&gt; to keep a reference to the activity that is listening.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private Listener listener;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Register the activity that the fragment is being attached to as an implementer of that interface.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override void onAttach(Context context) {
    super.onAttach(context);
    this.listener = (Listener) context;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;In the list fragment's &lt;code&gt;onListItemClick()&lt;/code&gt; method, respond to clicks by calling the listener's handler method named &lt;code&gt;itemClicked()&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public void onListItemClick(ListView listView, View itemView, int position, long id) {
    if (listener != null) {
        listener.itemClicked(id);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With these done, we can implement the &lt;code&gt;Listener&lt;/code&gt; interface in any &lt;code&gt;Activity&lt;/code&gt; our &lt;code&gt;ListFragment&lt;/code&gt; will be attached to, override its &lt;code&gt;itemClicked()&lt;/code&gt; method and write some custom logic in it to handle the click.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class DemoActivity extends AppCompatAtivity implements Listener {
    @Override 
    void itemClicked(long id) {
        // You can add custom logic here
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://dev.to/petemode/getting-an-activity-and-a-fragment-to-interact-28i7"&gt;Previous article: Getting an Activity and a Fragment to Interact&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://dev.to/petemode/switching-fragments-with-code-k8f"&gt;Coming up next: Switching Fragments Programatically&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>tutorial</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Getting an Activity and a Fragment to Interact</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Wed, 07 Sep 2022 13:32:59 +0000</pubDate>
      <link>https://dev.to/petemode/getting-an-activity-and-a-fragment-to-interact-28i7</link>
      <guid>https://dev.to/petemode/getting-an-activity-and-a-fragment-to-interact-28i7</guid>
      <description>&lt;p&gt;There are two ways activities and fragments interact. It's either the actvity calls the methods in its fragments or the fragment calls the methods in its parent activity.&lt;br&gt;
When an activity calls the methods of its fragments, it can pass data into and receive data from the fragments through the fragment's methods. The same goes for when fragments call methods on their activities. Now let's get into it.&lt;/p&gt;
&lt;h1&gt;
  
  
  Activity to Fragment Communication
&lt;/h1&gt;

&lt;p&gt;For an activity to communicate with its fragment, it needs a reference(or pointer) to the fragment. You get this reference to the fragment by calling the method &lt;code&gt;findFragmentById()&lt;/code&gt; on the result of calling either &lt;code&gt;getFragmentManager()&lt;/code&gt; or &lt;code&gt;getSupportFragmentManager()&lt;/code&gt;.&lt;br&gt;
If we had a fragment called &lt;em&gt;DemoFragment&lt;/em&gt; with an id of &lt;em&gt;demofragment&lt;/em&gt;, we would get a reference to it with the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FragmentManager fragmentManager = getSupportFragmentManager();
DemoFragment demoFragment = (DemoFragment)fragmentManager.findFragmentById(R.id.demofragment);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code breakdown&lt;/strong&gt;&lt;br&gt;
Calling the function &lt;code&gt;getSupportFragmentManager()&lt;/code&gt; returns a &lt;code&gt;FragmentManager&lt;/code&gt; instance. That instance has a method named &lt;code&gt;findFragmentById()&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's important to know that the &lt;code&gt;id&lt;/code&gt; of a fragment must be assigned in the &lt;code&gt;&amp;lt;fragment/&amp;gt;&lt;/code&gt; tag in the activity's xml layout file. This way, one fragment can have different ids in different activities.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you call the method &lt;code&gt;findFragmentById&lt;/code&gt; on the fragment manager, you need to type-cast it as the fragment class you want. The result of calling this method will be a reference to the fragment.&lt;/p&gt;

&lt;p&gt;When the activity has that reference to the fragment, it can access all its public fields and properties, and call all its public methods. That is how an activity can communicate with a fragment.&lt;/p&gt;
&lt;h1&gt;
  
  
  Fragment to Activity Communication
&lt;/h1&gt;

&lt;p&gt;For a fragment to communicate with its parent activity, it needs to get a reference to its activity. &lt;br&gt;
Assuming we have an activity named &lt;em&gt;DemoActivity&lt;/em&gt; and we want to call one of its public methods named &lt;em&gt;demoMethod()&lt;/em&gt;, we can do the job with the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;((DemoActivity)getActivity()).demoMethod();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code breakdown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To explain the code, let's divide it into two parts. Everything before the dot( &lt;strong&gt;.&lt;/strong&gt; ) is the first part and everything after it is the second part. Let's look at the first part.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;((DemoActivity)getActivity())&lt;/code&gt;:&lt;br&gt;
In this part, we are calling the method &lt;code&gt;getActivity()&lt;/code&gt; and converting it to an instance of our activity with type-casting. The result we'll get from this operation will be a reference to our activity. Now let's look at the second part.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;demoMethod()&lt;/code&gt;:&lt;br&gt;
This is a private method defined in our DemoActivity class. We are calling it through the activity reference we just got.&lt;/p&gt;

&lt;h1&gt;
  
  
  Fragment Lifecycle Methods
&lt;/h1&gt;

&lt;p&gt;Fragment lifecycle methods are linked to Activity lifecycle methods. This is a list of the fragment lifecycle methods:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onAttach(Context)&lt;/code&gt;: This method is called when a fragment is associated with a context&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onCreate(Bundle)&lt;/code&gt;: This method is the fragment's equivalent ot onCreate().&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onCreateView(LayoutInflater, ViewGroup, Bundle)&lt;/code&gt;: This is the method that's called to inflate the fragment's view.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onActivityCreated(Bundle)&lt;/code&gt;: This method is called when the parent activity's &lt;code&gt;onCreate&lt;/code&gt; method has completed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onStart()&lt;/code&gt;: is called when the fragment is created fully in the background.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onResume()&lt;/code&gt;: is called when the fragment becomes visible in the foreground.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onPause()&lt;/code&gt;: is called when a fragment leaves the foreground.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onStop()&lt;/code&gt;: is called when the fragment stops being visible to the user (when it enters the background)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onDestroyView&lt;/code&gt;: This method is called when the UI of the frgament is destroyed. It gives the developer the chance to clear any resources that are associated with the fragment's view.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onDestroy()&lt;/code&gt;: This method is used to clear any other resources associated with the fragment's class.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onDetach()&lt;/code&gt;: This method is called when the fragment is disassociated with the activity.&lt;/p&gt;

&lt;p&gt;The diagram below shows how the fragment lifecycle relates to the activity lifecycle and the points at which their lifecycles intersect. The fragment lifecycle callbacks are on the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46a0onznelwyckoo67v2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46a0onznelwyckoo67v2.png" alt="Android fragment and activity lifecycle callbacks" width="800" height="1541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Fragment&lt;/code&gt; class doesn't implement the &lt;code&gt;Context&lt;/code&gt; interface so a fragment isn't a type of context, and therefore doesn't have access to global information about the app environment. For fragments to access this data, they must use the context of other objects such as their parent activity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://dev.to/petemode/android-fragments-1gjm"&gt;Previous article: Android Fragments&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Coming up next: List Fragments&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>kotlin</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Android Fragments</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Tue, 06 Sep 2022 12:39:48 +0000</pubDate>
      <link>https://dev.to/petemode/android-fragments-1gjm</link>
      <guid>https://dev.to/petemode/android-fragments-1gjm</guid>
      <description>&lt;p&gt;To understand this article, you need to know that a fragment is a reusable component, it has a layout file that declares its UI and other basic stuff. I'll be showing you how to use it from first principle.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating Fragments
&lt;/h1&gt;

&lt;p&gt;All fragments must have a public constructor with no parameters(I'll be calling it a 'public no-arg constructor'). If you create a fragment class without one, you'll get a runtime exception. Java auto-generates a public no-arg constructor at runtime if there are no other constructors in the class but if you declare another constructor in the class, you'll have to declare the public no-arg constructor by yourself.&lt;/p&gt;

&lt;p&gt;Fragments have a method named &lt;code&gt;onCreateView()&lt;/code&gt;. This method is where the fragment's layout gets inflated. The method signature and body are usually like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    return inflater.inflate(R.layout.&amp;lt;layoutFileName&amp;gt;,container, false);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Breakdown&lt;/strong&gt;&lt;br&gt;
We can see that the method takes three arguments - A &lt;code&gt;LayoutInflater&lt;/code&gt; instance used to inflate or bind the layout you want to the component, a &lt;code&gt;ViewGroup&lt;/code&gt; that represents the portion of the activity's layout that the fragment will be inflated onto, and a &lt;code&gt;Bundle&lt;/code&gt; for saving instance state.&lt;/p&gt;

&lt;p&gt;Inside the method body, the LayoutInflater calls its &lt;code&gt;inflate()&lt;/code&gt; method. Its inflate method takes 3 arguments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The layout you want to inflate&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;ViewGroup&lt;/code&gt; passed into &lt;code&gt;onCeateView()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a boolean value called &lt;code&gt;attachToRoot&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In summary, the LayoutInflater object creates a &lt;code&gt;View&lt;/code&gt; object and the &lt;code&gt;onCreateView&lt;/code&gt; method returns the &lt;code&gt;View&lt;/code&gt; that's created.&lt;/p&gt;
&lt;h1&gt;
  
  
  Adding a Fragment To An Activity
&lt;/h1&gt;

&lt;p&gt;To add a fragment to an activity's layout, we add the &lt;code&gt;&amp;lt;fragment/&amp;gt;&lt;/code&gt; tag to the activity's xml layout file. The &lt;em&gt;name&lt;/em&gt; property of the fragment tag must be the fully-qualified name of the fragment class we want to associate with the layout.&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;fragment
    android:name="com.example.demoapp.ExampleFragment"
    android:layout_width="match_parent" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above assumes that we are building an app with the package name &lt;em&gt;com.example.demoapp&lt;/em&gt; and that the name of the fragment class is either &lt;em&gt;ExampleFragment.java&lt;/em&gt; or &lt;em&gt;ExampleFragment.kt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can apply other regular xml properties to your &lt;code&gt;&amp;lt;fragment/&amp;gt;&lt;/code&gt; tag. If there are no other views in your activity, your fragment can be its root layout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://dev.to/petemode/getting-an-activity-and-a-fragment-to-interact-28i7"&gt;Next: Getting an Activity and a Fragment to Interact&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>kotlin</category>
      <category>mobile</category>
    </item>
    <item>
      <title>My Goals For HNG i8</title>
      <dc:creator>Pete</dc:creator>
      <pubDate>Sun, 15 Aug 2021 07:58:44 +0000</pubDate>
      <link>https://dev.to/petemode/my-goals-for-hng-i8-34e0</link>
      <guid>https://dev.to/petemode/my-goals-for-hng-i8-34e0</guid>
      <description>&lt;p&gt;I'm a mobile app developer skilled in building Flutter applications and I recently joined the HNG i8 internship.&lt;/p&gt;

&lt;p&gt;The HNG internship is like military and coding bootcamps combined. It is highly competitive. It pushes everyone beyond their limits, teaches people industry-standard work practices and it does it in a very practical, hands-on way. In HNG, you either push yourself to perform or you take the next bus home.&lt;/p&gt;

&lt;p&gt;I'm a developer who gets creative when my fight or flight response is triggered and so HNG is the place for me.&lt;/p&gt;

&lt;p&gt;As an intern in HNG, my goals are to adapt to working in a fast-paced, real world environment, to build and debug real world software, collaborate with like-minded people, expand my network, catch the attention of big tech companies and to get that legendary T-shirt.&lt;/p&gt;

&lt;p&gt;The registration link for the internship is:&lt;br&gt;
&lt;a href="https://internship.zuri.team" rel="noopener noreferrer"&gt;https://internship.zuri.team&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figma tutorial link:&lt;br&gt;
&lt;a href="https://youtu.be/jk1T0CdLxwU" rel="noopener noreferrer"&gt;https://youtu.be/jk1T0CdLxwU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Git tutorial link:&lt;br&gt;
&lt;a href="https://youtu.be/8JJ101D3knE" rel="noopener noreferrer"&gt;https://youtu.be/8JJ101D3knE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML tutorial link:&lt;br&gt;
&lt;a href="https://youtu.be/qz0aGYrrlhU" rel="noopener noreferrer"&gt;https://youtu.be/qz0aGYrrlhU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dart language tutorial link:&lt;br&gt;
&lt;a href="https://youtu.be/Ej_Pcr4uC2Q" rel="noopener noreferrer"&gt;https://youtu.be/Ej_Pcr4uC2Q&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Flutter tutorial link:&lt;br&gt;
&lt;a href="https://youtube.com/playlist?list=PLSzsOkUDsvdtl3Pw48-R8lcK2oYkk40cm" rel="noopener noreferrer"&gt;https://youtube.com/playlist?list=PLSzsOkUDsvdtl3Pw48-R8lcK2oYkk40cm&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
