<?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>Forem: Arda Kazancı</title>
    <description>The latest articles on Forem by Arda Kazancı (@ardakazanci).</description>
    <link>https://forem.com/ardakazanci</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%2F122335%2F24554fb9-cb82-4752-8716-401caee0d797.jpeg</url>
      <title>Forem: Arda Kazancı</title>
      <link>https://forem.com/ardakazanci</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ardakazanci"/>
    <language>en</language>
    <item>
      <title>Creating an Interactive User Interface with Dynamic Lines Jetpack Compose</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Wed, 24 Jan 2024 15:47:24 +0000</pubDate>
      <link>https://forem.com/ardakazanci/creating-an-interactive-user-interface-with-dynamic-lines-jetpack-compose-497n</link>
      <guid>https://forem.com/ardakazanci/creating-an-interactive-user-interface-with-dynamic-lines-jetpack-compose-497n</guid>
      <description>&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExdmV1cTM1a3hmYnV0ZTZrc2dkOW4yZG83YnluOGVzajE5ZzJhdWg5NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/q1NuB0nnikLxTbxDC1/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExdmV1cTM1a3hmYnV0ZTZrc2dkOW4yZG83YnluOGVzajE5ZzJhdWg5NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/q1NuB0nnikLxTbxDC1/giphy.gif" width="202" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an Interactive User Interface with Dynamic Lines: Exploring DraggableLineDrawing in Jetpack Compose
&lt;/h2&gt;

&lt;p&gt;Jetpack Compose offers Android app developers a wide range of possibilities for creating modern and interactive user interfaces. Today, we will explore how to use Jetpack Compose to manage complex user interactions with an example called DraggableLineDrawing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview of the Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The DraggableLineDrawing function creates a series of buttons that users can drag around, interconnected with dynamic lines. When these buttons are clicked, an explosion effect is triggered. Here are the main components of this function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initial State of Buttons: The initial position and explosion state of each button are managed using mutableStateOf and mutableStateListOf. This aligns with Compose's reactive architecture, keeping track of the UI's current state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Line Drawing: Inside a Canvas, lines are dynamically drawn between buttons based on a specific distance condition. These lines update dynamically according to the current positions of the buttons.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Button and Explosion Effect: Each button is drawn as a circle. In the explosion state, small circles scattered around the button create a visual explosion effect.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Detailed Examination of DraggableLineDrawing Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This function contains a Canvas and a series of DraggableButtonDrawing components within a Box:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Positioning and Updating Buttons: Buttons are created with random initial positions on the screen and can be dragged by the user to update their positions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamically Drawing Lines: Lines are drawn between two buttons when the distance between them falls below a set threshold, providing a dynamic response to user interactions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explosion Effect: When a button is clicked, it "explodes," scattering colored circles around it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Details of the DraggableButtonDrawing Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The DraggableButtonDrawing function creates the visual representation of each button:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Button Drawing: Each button is drawn as a circle filled with a specified color.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explosion Animation: On clicking the button, small circles are randomly scattered around the button to create an explosion effect.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Visual and Interaction Aspects of the User Interface&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This application offers a rich user experience with color transitions, animations, and interactive drawings. Users can change the behavior of the application in real-time by dragging the buttons and clicking on them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The DraggableLineDrawing application excellently demonstrates the flexibility and power provided by Jetpack Compose. It clearly shows how mathematical calculations and customizable drawing processes can be used to create dynamic UI elements that respond to user interactions. For Android developers, this serves as a valuable example for enriching user experience and creating interactive applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/ardakazanci/d7935806db9e647bcc0e92cc0311ad0b" rel="noopener noreferrer"&gt;This Full Code &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My Profile &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ardakazanci/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; &lt;/p&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>Creating Dynamic Menus with Jetpack Compose</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Sun, 21 Jan 2024 08:03:43 +0000</pubDate>
      <link>https://forem.com/ardakazanci/creating-dynamic-menus-with-jetpack-compose-68a</link>
      <guid>https://forem.com/ardakazanci/creating-dynamic-menus-with-jetpack-compose-68a</guid>
      <description>&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExcHF0MWo1Y25zbGdzMmk0MDcwcTdtbzU1cmFkbDQ4ZHliMHJmaDR5MCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/zERh33HDjqAbPZOEKr/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExcHF0MWo1Y25zbGdzMmk0MDcwcTdtbzU1cmFkbDQ4ZHliMHJmaDR5MCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/zERh33HDjqAbPZOEKr/giphy.gif" width="257" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kotlin and Jetpack Compose stand at the forefront of modern Android application development. Today, I’ll show you how to create an interactive and visually appealing menu structure using this powerful combination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Structure of the Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Our project contains a main activity named MainActivity, which extends from the ComponentActivity class. On app launch, this activity sets up our user interface with the setContent method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            CircularMenuGroupTheme {
                MainMenuCanvas()
            }
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Menu Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Our @Composable function, MainMenuCanvas, defines the visual design and behavior of the menu. The main menu is designed as a central circle with sub-menu buttons around it. These sub-menus open and close with an animated effect.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Composable
fun MainMenuCanvas() {
    // Menu items and animations are defined here
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dynamic and Colorful Circles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the most striking features of the menu is that each sub-menu item has different color gradients. Kotlin’s Random function dynamically generates these colors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Interaction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The menu responds to touch inputs. When the main circle is tapped, the sub-menus open, and each sub-menu item can be moved by dragging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project demonstrates the flexibility of Jetpack Compose and the power of Kotlin. Interactive menus are crucial elements that enrich the user experience in a modern application. This example opens the doors to creating visually attractive and practical interfaces with Jetpack Compose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/ardakazanci/24a29183c8efe1c0adc838fc5bfbea9a" rel="noopener noreferrer"&gt;This Full Code &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My Profile &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ardakazanci/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; &lt;/p&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>Day #6 - Popular Movies App - MVVM</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Sat, 14 Sep 2019 15:13:17 +0000</pubDate>
      <link>https://forem.com/ardakazanci/day-6-popular-movies-app-mvvm-2a3m</link>
      <guid>https://forem.com/ardakazanci/day-6-popular-movies-app-mvvm-2a3m</guid>
      <description>&lt;p&gt;Hi, I've reprogrammed the popular movies listing application with MVVM architecture. Hope to help.&lt;/p&gt;

&lt;p&gt;Waiting for your follow-up.&lt;/p&gt;

&lt;p&gt;Thank You, Arda.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ardakazanci/PopularMoviesMVVM" rel="noopener noreferrer"&gt;https://github.com/ardakazanci/PopularMoviesMVVM&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
    </item>
    <item>
      <title>Day #5 - Popular Movies App</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Wed, 11 Sep 2019 18:04:31 +0000</pubDate>
      <link>https://forem.com/ardakazanci/day-5-popular-movies-app-53lh</link>
      <guid>https://forem.com/ardakazanci/day-5-popular-movies-app-53lh</guid>
      <description>&lt;p&gt;Hello, I am practicing android application development every day. I will share my samples daily.&lt;/p&gt;

&lt;p&gt;Note: There may be old techniques. The logic is the same.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feel free to contact me for any questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/ardakazanci/Udacity_Popular_Movies_Stage_1" rel="noopener noreferrer"&gt;https://github.com/ardakazanci/Udacity_Popular_Movies_Stage_1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
    </item>
    <item>
      <title>Day #4 - Simple Weather App V2</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Fri, 30 Aug 2019 16:48:22 +0000</pubDate>
      <link>https://forem.com/ardakazanci/day-4-simple-weather-app-v2-2j2i</link>
      <guid>https://forem.com/ardakazanci/day-4-simple-weather-app-v2-2j2i</guid>
      <description>&lt;p&gt;Hello, I am practicing android application development every day. I will share my samples daily.&lt;/p&gt;

&lt;p&gt;Note: There may be old techniques. The logic is the same.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feel free to contact me for any questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/ardakazanci/WeatherAppV2" rel="noopener noreferrer"&gt;https://github.com/ardakazanci/WeatherAppV2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>gson</category>
      <category>picasso</category>
      <category>retrofit</category>
    </item>
    <item>
      <title>Day #3 - Simple Weather App</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Tue, 20 Aug 2019 07:31:18 +0000</pubDate>
      <link>https://forem.com/ardakazanci/day-3-simple-weather-app-1m1p</link>
      <guid>https://forem.com/ardakazanci/day-3-simple-weather-app-1m1p</guid>
      <description>&lt;p&gt;Hello, I am practicing android application development every day. I will share my samples daily.&lt;/p&gt;

&lt;p&gt;Note: There may be old techniques. The logic is the same.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feel free to contact me for any questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/ardakazanci/AndroidWeatherApp" rel="noopener noreferrer"&gt;https://github.com/ardakazanci/AndroidWeatherApp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>gson</category>
      <category>picasso</category>
    </item>
    <item>
      <title>Day #2 - Native Flags Game</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Fri, 16 Aug 2019 20:11:24 +0000</pubDate>
      <link>https://forem.com/ardakazanci/day-2-native-flags-game-3pb9</link>
      <guid>https://forem.com/ardakazanci/day-2-native-flags-game-3pb9</guid>
      <description>&lt;p&gt;Hello, I am practicing android application development every day. I will share my samples daily.&lt;/p&gt;

&lt;p&gt;Note: There may be old techniques. The logic is the same.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feel free to contact me for any questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/ardakazanci/FlagsQuizGame" rel="noopener noreferrer"&gt;https://github.com/ardakazanci/FlagsQuizGame&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>sqlite</category>
    </item>
    <item>
      <title>Day #1 - Google Map Demo</title>
      <dc:creator>Arda Kazancı</dc:creator>
      <pubDate>Wed, 14 Aug 2019 20:25:00 +0000</pubDate>
      <link>https://forem.com/ardakazanci/day-1-google-map-demo-2g96</link>
      <guid>https://forem.com/ardakazanci/day-1-google-map-demo-2g96</guid>
      <description>&lt;p&gt;Hello, I am practicing android application development every day. I will share my samples daily.&lt;/p&gt;

&lt;p&gt;Note: There may be old techniques. The logic is the same.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feel free to contact me for any questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/ardakazanci/GoogleMapDemo" rel="noopener noreferrer"&gt;https://github.com/ardakazanci/GoogleMapDemo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>googlemaps</category>
    </item>
  </channel>
</rss>
