<?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: Spikey sanju</title>
    <description>The latest articles on DEV Community by Spikey sanju (@spikeysanju).</description>
    <link>https://dev.to/spikeysanju</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%2F193111%2F6414304b-db54-4955-970a-fd49fdd577ea.png</url>
      <title>DEV Community: Spikey sanju</title>
      <link>https://dev.to/spikeysanju</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/spikeysanju"/>
    <language>en</language>
    <item>
      <title>Title</title>
      <dc:creator>Spikey sanju</dc:creator>
      <pubDate>Wed, 29 May 2024 18:14:11 +0000</pubDate>
      <link>https://dev.to/spikeysanju/title-507j</link>
      <guid>https://dev.to/spikeysanju/title-507j</guid>
      <description>&lt;p&gt;Body&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>🚀 Jetpack Compose Layouts</title>
      <dc:creator>Spikey sanju</dc:creator>
      <pubDate>Sat, 24 Oct 2020 06:53:12 +0000</pubDate>
      <link>https://dev.to/spikeysanju/jetpack-compose-layouts-5715</link>
      <guid>https://dev.to/spikeysanju/jetpack-compose-layouts-5715</guid>
      <description>&lt;p&gt;Howdy Android Devs👋, This is my first article for Android 🥰.  In this article, we gonna see the basics of Layout in Jetpack compose 📒 &amp;amp; How to use them 💡.&lt;/p&gt;

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

&lt;p&gt;Before jumping 🏃🏻‍♂️ into the topic let's learn about Jetpack compose first!&lt;/p&gt;

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

&lt;h1&gt;
  
  
  &lt;strong&gt;What is Jetpack Compose 🤔?&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Jetpack Compose is Android’s modern toolkit for building native UI. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Some Interesting facts below 👇&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffroctgxg4kaxumlvihvr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffroctgxg4kaxumlvihvr.png" alt="Screenshot 1942-08-02 at 10.43.17" width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Now let's learn about layouts in compose 😋&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Jetpack compose have various layouts in this article we gonna the see about standard layouts 👇&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Column&lt;/li&gt;
&lt;li&gt;Row&lt;/li&gt;
&lt;li&gt;Box&lt;/li&gt;
&lt;li&gt;Constraint etc...&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Now let's see how to use the above standard layout in compose 👍&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;What is the Column Layout?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Use Column to place items vertically on the screen. It's like a &lt;code&gt;LinearLayout (Vertical Orientation)&lt;/code&gt; in Android XML.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Example for Column Layout💡&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Composable
fun ProfileCard() {
  Column {
    Text("Spikey Sanju")
    Text("Android Developer &amp;amp; UI/UX Designer")
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;In this above example, We have added the &lt;code&gt;@Composable&lt;/code&gt; annotation to create the Composable function.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Composable functions can be only called from another Composable function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Composable functions are the functions that we use to draw the UI on the screen. All the widgets written inside it is rendered on the screen.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;h3&gt;
  
  
  &lt;strong&gt;Now let's take a look inside the sample code 🕵🏻‍♂️&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We are placing two text components inside the &lt;code&gt;Column&lt;/code&gt; layout. Now the &lt;code&gt;Column&lt;/code&gt; layout will place all the items inside the Column Vertically&lt;/p&gt;

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

&lt;h3&gt;
  
  
  &lt;strong&gt;Now let's see the output 🥳&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fafa6uix4rh1pqw51r862.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fafa6uix4rh1pqw51r862.png" alt="ROWS &amp;amp; COLUMNS" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay, this is how the Column works 😄. Now let's take a look at the &lt;code&gt;Row&lt;/code&gt; Layout 👍&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;What is the Row Layout?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Use Row to place items horizontally on the screen. It's like a &lt;code&gt;LinearLayout (Horizontal Orientation)&lt;/code&gt; in Android XML.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Example for Row Layout💡&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Composable
fun ProfileCard() {
  Row{

// getting the image from the drawable
            Image(modifier = modifier.preferredSize(60.dp).clip(CircleShape).align(Alignment.CenterVertically),
                    asset = imageResource(id = R.drawable.spikeysanju),
                    contentScale = ContentScale.Crop)


// used to give horizontal spacing between components
            Spacer(modifier = modifier.width(16.dp))

            Column(modifier = modifier.align(Alignment.CenterVertically)) {
                Text(text = "Spikey Sanju", color = Color.Black, style = typography.h6)

// used to give vertical spacing between components
                Spacer(modifier = modifier.height(8.dp))
                Text(text = "Android Developer &amp;amp; UI/UX Designer", color = Color.DarkGray, style = typography.caption)
            }
        }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;In the above code, we have used Modifiers. Let's explore the modifiers 👨🏻‍💻&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;What are Modifiers in Compose 😋&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Modifiers allow you to tweak how a composable is presented. Modifiers let you do these sorts of things:&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Change the composable's behavior and appearance&lt;/li&gt;
&lt;li&gt;Add information, like accessibility labels&lt;/li&gt;
&lt;li&gt;Process user input&lt;/li&gt;
&lt;li&gt;Add high-level interactions, like making an element clickable, scrollable, draggable, or zoomable&lt;/li&gt;
&lt;/ol&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Modifiers are standard Kotlin objects. Create a modifier by calling one of the Modifier class functions. You can chain these functions together to compose them:&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;h3&gt;
  
  
  &lt;strong&gt;Now let's see the output for Row Layout 🥳&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhs7f8hfg2k1u7zuh6gim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhs7f8hfg2k1u7zuh6gim.png" alt="ROWS &amp;amp; COLUMNS" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Let's see the blueprint of the above examples for Rows &amp;amp; Columns ℹ️&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F36qvkdvbdd88yj1wtrx8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F36qvkdvbdd88yj1wtrx8.png" alt="Alt Text" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Now you can understand how the layout is combined &amp;amp; arranged. &lt;br&gt;
This is how you have to combine Rows &amp;amp; Columns to create various layout according to your needs.&lt;/p&gt;

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

&lt;p&gt;In the next article, we will see how to use Box Layout, Constraint Layout &amp;amp; much more fun kinds of stuff in jetpack compose ... Stay tuned 🥳🤘...&lt;/p&gt;

&lt;p&gt;Comment down your thoughts below 👇&lt;/p&gt;

</description>
      <category>jetpackcompose</category>
      <category>android</category>
      <category>design</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Solving Project Euler Problem Everyday - Day 01</title>
      <dc:creator>Spikey sanju</dc:creator>
      <pubDate>Sun, 23 Feb 2020 20:47:26 +0000</pubDate>
      <link>https://dev.to/spikeysanju/solving-project-euler-problem-everyday-day-01-155k</link>
      <guid>https://dev.to/spikeysanju/solving-project-euler-problem-everyday-day-01-155k</guid>
      <description>&lt;p&gt;Find the sum of all the multiples of 3 or 5 below 1000.&lt;/p&gt;

&lt;p&gt;I have used kotlin for this problem.&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@Dvlprsanju/No1-Sum-of-all-3-or-5-divisible-number-less-1000?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


</description>
      <category>kotlin</category>
      <category>eulerproblems</category>
      <category>coding</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Implementation of Caesar Cipher in C++</title>
      <dc:creator>Spikey sanju</dc:creator>
      <pubDate>Tue, 19 Nov 2019 18:50:45 +0000</pubDate>
      <link>https://dev.to/spikeysanju/implementation-of-caesar-cipher-in-c-1opl</link>
      <guid>https://dev.to/spikeysanju/implementation-of-caesar-cipher-in-c-1opl</guid>
      <description>&lt;p&gt;Implementation of Caesar Cipher in C++&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@Dvlprsanju/Information-Security?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


</description>
      <category>replit</category>
      <category>c11</category>
    </item>
    <item>
      <title>Basic of CPP</title>
      <dc:creator>Spikey sanju</dc:creator>
      <pubDate>Wed, 10 Jul 2019 11:27:03 +0000</pubDate>
      <link>https://dev.to/spikeysanju/basic-of-cpp-4cgb</link>
      <guid>https://dev.to/spikeysanju/basic-of-cpp-4cgb</guid>
      <description>&lt;p&gt;Executing functions with the switch statements&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@Dvlprsanju/DelectableAdorableSystemresource-1?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


</description>
      <category>c11</category>
      <category>replit</category>
    </item>
  </channel>
</rss>
