<?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: MANOJRATNA DUGGIRALA</title>
    <description>The latest articles on DEV Community by MANOJRATNA DUGGIRALA (@manojratnaduggirala).</description>
    <link>https://dev.to/manojratnaduggirala</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%2F1782910%2F31d53935-e408-4b62-8d5b-1e29a2421330.jpg</url>
      <title>DEV Community: MANOJRATNA DUGGIRALA</title>
      <link>https://dev.to/manojratnaduggirala</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manojratnaduggirala"/>
    <language>en</language>
    <item>
      <title>Hands-on Android Development: Building Apps with Java &amp; Android Studio</title>
      <dc:creator>MANOJRATNA DUGGIRALA</dc:creator>
      <pubDate>Sun, 02 Mar 2025 12:40:16 +0000</pubDate>
      <link>https://dev.to/manojratnaduggirala/hands-on-android-development-building-apps-with-java-android-studio-4igb</link>
      <guid>https://dev.to/manojratnaduggirala/hands-on-android-development-building-apps-with-java-android-studio-4igb</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Android Studio?&lt;/strong&gt;&lt;br&gt;
Android Studio is the official Integrated Development Environment (IDE) for Android app development, built by Google. It provides developers with a powerful and flexible environment to design, develop, test, and debug Android applications efficiently.&lt;/p&gt;

&lt;p&gt;Key Features of Android Studio:&lt;br&gt;
✅ Intelligent Code Editor: It supports Java, Kotlin, and C++, offering features like code completion, refactoring, and real-time error checking.&lt;/p&gt;

&lt;p&gt;✅ Layout Editor: A drag-and-drop UI designer that helps developers design app interfaces visually without writing XML manually.&lt;/p&gt;

&lt;p&gt;✅ Gradle Build System: Automates and optimizes app building, making it easier to manage dependencies and configurations.&lt;/p&gt;

&lt;p&gt;✅ Emulator for Testing: Provides a virtual Android device to test applications without needing a physical phone.&lt;/p&gt;

&lt;p&gt;✅ APK Analyzer: Helps inspect the app’s APK file size and resources to optimize performance.&lt;/p&gt;

&lt;p&gt;✅ Version Control Integration: Supports Git and other version control tools for collaborative development.&lt;/p&gt;

&lt;p&gt;✅ Real-time Performance Profiler: Monitors CPU, memory, and network usage to optimize app performance.&lt;/p&gt;

&lt;p&gt;Why Developers Love Android Studio?&lt;br&gt;
User-friendly UI with a sleek and intuitive interface.&lt;br&gt;
Deep integration with Google Services, including Firebase and Google Play.&lt;br&gt;
Regular updates with the latest Android features and improvements.&lt;br&gt;
Cross-platform support for Wear OS, Android TV, and more.&lt;br&gt;
Android Studio is the ultimate toolkit for any developer looking to create high-performance Android applications! &lt;/p&gt;

&lt;p&gt;In this Workshop, I Have Developed 4 Applications, and here is a detailed Overview of Every Application&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Simple Counter App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This XML layout defines a simple Tap Counter App UI using a &lt;strong&gt;LinearLayout&lt;/strong&gt;, &lt;strong&gt;two Button elements&lt;/strong&gt;, and a &lt;strong&gt;TextView&lt;/strong&gt;. Let’s break it down step by step.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Root Layout - LinearLayout
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main"
    android:layout_margin="20sp"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:weightSum="10"
    android:orientation="vertical"
    tools:context=".MainActivity"&amp;gt;

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

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Count Button
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Button
    android:layout_width="match_parent"
    android:layout_height="4dp"
    android:layout_weight="1"
    android:text="Count"
    android:onClick="count"
    android:textSize="24sp" /&amp;gt;

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

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;TextView - Display Counter Value
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;TextView
    android:id="@+id/text1"
    android:layout_width="match_parent"
    android:layout_height="0sp"
    android:layout_weight="8"
    android:text="0"
    android:gravity="center"
    android:textSize="200sp"/&amp;gt;

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

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Toast Button
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Button
    android:layout_width="match_parent"
    android:layout_height="0sp"
    android:layout_weight="1"
    android:text="Toast"
    android:onClick="toast"
    android:textSize="24sp"/&amp;gt;

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

&lt;/div&gt;


&lt;p&gt;MainActivity.java File &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Package and Imports
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.android_workshop;

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

&lt;/div&gt;


&lt;p&gt;This defines the package name of APP&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Defining Variables and Extending AppCompatActivity
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class MainActivity extends AppCompatActivity {
    TextView t1;
    int count = 0;

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt; onCreate() Method - Initializing the UI
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    EdgeToEdge.enable(this);
    setContentView(R.layout.activity_main);

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Linking TextView from XML to Java
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    t1 = this.&amp;lt;TextView&amp;gt;findViewById(R.id.text1);

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt; Handling Window Insets (Edge-to-Edge UI)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -&amp;gt; {
        Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
        v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
        return insets;
    });

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;count() Method - Increasing the Counter
&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 count(View view) {
    count++;
    t1.setText("" + count);
}

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;toast() Method - Showing a Toast Message
&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 toast(View view) {
    Toast.makeText(MainActivity.this, "Hello my dear Connections" + count,
            Toast.LENGTH_LONG).show();
}

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

&lt;/div&gt;



&lt;p&gt;How Does the App Works?&lt;br&gt;
1️⃣ Pressing the "Count" button increases the counter and updates the TextView.&lt;br&gt;
2️⃣ Pressing the "Toast" button displays a message showing the current count.&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%2Fg8guparpieix33xgc6jb.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%2Fg8guparpieix33xgc6jb.png" alt="Image description" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Simple Calculator App&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This XML file defines the &lt;strong&gt;UI for a simple calculator app&lt;/strong&gt; in Android using &lt;code&gt;LinearLayout&lt;/code&gt;.  &lt;/p&gt;

&lt;p&gt;Overview:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dark Theme (&lt;code&gt;android:background="#000"&lt;/code&gt;)&lt;/strong&gt; for a stylish look.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Title (&lt;code&gt;TextView&lt;/code&gt;):&lt;/strong&gt; Displays "Calculator" in red text.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two Input Fields (&lt;code&gt;EditText&lt;/code&gt;):&lt;/strong&gt; Allow users to enter two numbers.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Four Buttons (&lt;code&gt;Button&lt;/code&gt;):&lt;/strong&gt; Perform addition (&lt;code&gt;+&lt;/code&gt;), subtraction (&lt;code&gt;-&lt;/code&gt;), multiplication (&lt;code&gt;*&lt;/code&gt;), and division (&lt;code&gt;/&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result Display (&lt;code&gt;TextView&lt;/code&gt;):&lt;/strong&gt; Shows the output after a calculation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next step?&lt;/strong&gt; Implement logic in &lt;code&gt;MainActivity.java&lt;/code&gt; to perform calculations when buttons are clicked!&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;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main"
    android:orientation="vertical"
    android:background="#000"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"&amp;gt;
    &amp;lt;TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Calculator"
        android:textSize="24sp"
        android:textColor="@color/design_default_color_error"
        android:layout_margin="20sp"
        android:gravity="center"/&amp;gt;
    &amp;lt;EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/edit1"
        android:hint="Enter First Value "
        android:textSize="24sp"
        android:layout_margin="10sp"
        android:textColor="@color/design_default_color_error"/&amp;gt;
    &amp;lt;EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/edit2"
        android:hint="Enter Second Value "
        android:textSize="24sp"
        android:layout_margin="10sp"
        android:textColor="@color/design_default_color_error"/&amp;gt;
    &amp;lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_margin="10dp"&amp;gt;

    &amp;lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="+"
        android:onClick="Pluse"
        android:textSize="24sp"
        android:gravity="center" /&amp;gt;
    &amp;lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="-"
        android:onClick="Minus"
        android:textSize="24sp"
        android:gravity="center" /&amp;gt;
    &amp;lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="*"
        android:onClick="Multiplication"
        android:textSize="24sp"
        android:gravity="center" /&amp;gt;
    &amp;lt;Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="/"
        android:onClick="Division"
        android:textSize="24sp"
        android:gravity="center" /&amp;gt;


&amp;lt;/LinearLayout&amp;gt;
    &amp;lt;TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/text1"
        android:text="Result"
        android:textSize="24sp"
        android:layout_margin="30sp"
        android:gravity="center"/&amp;gt;
&amp;lt;/LinearLayout&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;This Java class defines the logic for a simple calculator app in Android. It handles basic arithmetic operations (+, -, *, /) based on user input.&lt;/p&gt;

&lt;p&gt;Key Highlights:&lt;br&gt;
UI Elements:&lt;br&gt;
EditText e1, e2; → Input fields for user-entered numbers.&lt;br&gt;
TextView t1; → Displays the result.&lt;br&gt;
Arithmetic Operations:&lt;br&gt;
Addition (Pluse) – Adds two numbers.&lt;br&gt;
Subtraction (Minus) – Subtracts second number from the first.&lt;br&gt;
Multiplication (Multiplication) – Multiplies two numbers.&lt;br&gt;
Division (Division) – Divides first number by second.&lt;br&gt;
EdgeToEdge &amp;amp; Insets Handling: Ensures UI adapts to system bars.&lt;br&gt;
Event Handling: Click events trigger calculations when users press buttons.&lt;br&gt;
💡 Possible Improvements:&lt;br&gt;
✔️ Handle division by zero to prevent app crashes.&lt;br&gt;
✔️ Use try-catch to prevent errors when fields are empty.&lt;/p&gt;

&lt;p&gt;Next step? Improve UI and add more features like clear/reset buttons!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.simplecaluclator;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {
    EditText e1,e2;
    TextView t1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        e1=this.&amp;lt;EditText&amp;gt;findViewById(R.id.edit1);
        e2=this.&amp;lt;EditText&amp;gt;findViewById(R.id.edit2);
        t1=this.&amp;lt;TextView&amp;gt;findViewById(R.id.text1);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -&amp;gt; {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });
    }

    public void Pluse(View view) {
        int a,b,c;
        a=Integer.parseInt(e1.getText().toString());
        b=Integer.parseInt(e2.getText().toString());
        c=a+b;
        t1.setText(""+c);
    }

    public void Minus(View view) {
        int a,b,c;
        a=Integer.parseInt(e1.getText().toString());
        b=Integer.parseInt(e2.getText().toString());
        c=a-b;
        t1.setText(""+c);
    }

    public void Multiplication(View view) {
        int a,b,c;
        a=Integer.parseInt(e1.getText().toString());
        b=Integer.parseInt(e2.getText().toString());
        c=a*b;
        t1.setText(""+c);
    }

    public void Division(View view) {
        int a,b,c;
        a=Integer.parseInt(e1.getText().toString());
        b=Integer.parseInt(e2.getText().toString());
        c=a/b;
        t1.setText(""+c);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And This is How it Works;&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%2Fde11nxedx26gxdngiz8m.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%2Fde11nxedx26gxdngiz8m.png" alt="Image description" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During my Android Development Workshop, I explored and built some amazing applications that truly enhanced my skills. Here are my top projects:&lt;/p&gt;

&lt;p&gt;✅ 📱 Simple Calculator App – A clean, functional UI with basic arithmetic operations.&lt;br&gt;
✅ 🗣️ Text-to-Speech App – Convert text into speech with a simple click!&lt;br&gt;
✅ 🔀 Intent Application – Seamlessly navigate between activities in Android apps.&lt;/p&gt;

&lt;p&gt;These projects gave me hands-on experience with Java &amp;amp; Android Studio, and I loved the process of bringing ideas to life. &lt;/p&gt;

&lt;p&gt;👀 More details? I’ll be sharing an in-depth blog soon. Stay tuned!&lt;/p&gt;

&lt;p&gt;🔗 Let's connect on &lt;a href="https://www.linkedin.com/in/manojratnaduggirala/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;! Feel free to DM me to discuss Android development and more.  &lt;/p&gt;

&lt;h1&gt;
  
  
  AndroidDevelopment #AndroidStudio #Java #DevCommunity
&lt;/h1&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>kotlin</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
