Welcome to

w3study.github.io




UI Components in Android - यूआई कंपोनेंट्स क्या होते हैं?



UI Components:

UI Components वे ग्राफिकल एलिमेंट्स (Graphical Elements) होते हैं जो किसी Android ऐप के यूजर इंटरफेस को बनाते हैं। ये स्क्रीन पर दिखाई देने वाले सभी विजुअल एलिमेंट्स को नियंत्रित करते हैं, जैसे Buttons, Text Fields, Images, Menus, Lists, और Dialog Boxes।

मुख्य UI Components:

Widgets (Views)

ये UI Elements होते हैं जो स्क्रीन पर दिखते हैं और यूज़र से इनपुट लेते हैं।

Example: TextView, Button, EditText, ImageView आदि।

Layouts (ViewGroups)

ये उन Containers की तरह होते हैं, जिनमें Views को अरेंज किया जाता है।

Example: LinearLayout, RelativeLayout, ConstraintLayout आदि।

Notifications

ये Alerts या Updates देने के लिए उपयोग किए जाते हैं।

Example: Toast, Snackbar, Status Bar Notifications आदि।

Menus and Dialogs

ये यूज़र को Additional Options देने के लिए उपयोग किए जाते हैं।

Example: Popup Menu, Alert Dialog, Bottom Sheet आदि।


Views in Android (व्यू क्या होता है?)

View Android UI का सबसे छोटा Building Block होता है, जो स्क्रीन पर कोई Visual Element प्रदर्शित करता है। यह वह इंटरफ़ेस है जिससे यूज़र ऐप के साथ इंटरैक्ट कर सकता है।

Views की विशेषताएँ:

Views एक स्क्रीन पर UI के हिस्से होते हैं, जैसे Text, Button, Image आदि।

हर View की एक Height और Width होती है।

यह Input ले सकता है (जैसे EditText में Text टाइप करना) और यूज़र से Interaction कर सकता है (जैसे Button क्लिक करना)।

Views के मुख्य प्रकार:

Basic Views (Widgets)

TextView → टेक्स्ट दिखाने के लिए।

EditText → यूज़र से टेक्स्ट इनपुट लेने के लिए।

Button → कोई एक्शन परफॉर्म करने के लिए।

ImageView → इमेज दिखाने के लिए।

CheckBox & RadioButton → ऑप्शन्स सेलेक्ट करने के लिए।

Containers (ViewGroups)

LinearLayout → Views को एक लाइन में अरेंज करता है।

RelativeLayout → Views को एक-दूसरे के सापेक्ष (relative) अरेंज करता है।

ConstraintLayout → Flexible UI Design के लिए।

Advanced Views

RecyclerView → लिस्ट या ग्रिड में डेटा दिखाने के लिए।

WebView → Web Pages को ऐप में लोड करने के लिए।

ProgressBar → Loading Animation दिखाने के लिए।


Notifications in Android (नोटिफिकेशन क्या होता है?)

Notification एक Alert या Message होता है जो ऐप द्वारा यूज़र को सूचना देने के लिए स्क्रीन पर दिखाया जाता है, चाहे ऐप बैकग्राउंड में चल रहा हो या बंद हो।

Notifications की विशेषताएँ:

ये यूज़र को Real-Time Updates देने के लिए बनाए जाते हैं।

इनका उपयोग Messages, Alerts, Warnings, या Background Tasks की जानकारी देने के लिए किया जाता है।

यह यूज़र को Engage रखने और Interaction बढ़ाने में मदद करता है।

Notifications के प्रकार:

Toast Notification

यह छोटा मैसेज होता है, जो स्क्रीन पर कुछ सेकंड्स के लिए दिखता है और फिर गायब हो जाता है।

    Toast.makeText(context, "This is a Toast Message", Toast.LENGTH_SHORT).show();
    Snackbar Notification

यह Toast की तरह होता है, लेकिन इसमें Action Button भी हो सकता है।

    Snackbar.make(view, "This is a Snackbar", Snackbar.LENGTH_LONG).show();

Status Bar Notification

यह Notification Panel में दिखता है और यह यूज़र के Interaction का इंतजार करता है।

      NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "channel_id")
      .setSmallIcon(R.drawable.notification_icon)
      .setContentTitle("New Message")
      .setContentText("You have received a new message")
      .setPriority(NotificationCompat.PRIORITY_DEFAULT);

Heads-Up Notification

यह High-Priority Notification होता है, जो स्क्रीन के टॉप पर एक Popup की तरह दिखाई देता है।

Push Notification

यह Firebase Cloud Messaging (FCM) के जरिए भेजे जाते हैं और इंटरनेट के माध्यम से काम करते हैं।



Request:

हैलो दोस्तों! उम्मीद करता हूं आपको हमारा यह कंटेंट पसंद आया होगा। अगर आपको हमारा ये content/post पसंद आई हो तो अपने दोस्तों के पास भी share करे। और अगर आपको कोई problem या कोई specific content हिन्दी में चाहिए है तो आप हमें नीचे दिए गए Email या whatsapp number के जरिए बता सकते है।

अगर आप CCC/diploma/polytechnic/MCA/BCA etc कर रहे है तो ये website स्पेशली आपके लिए ही है, जो student हिंदी में पढ़ाई करते है।

Contact Us

Email: deepanshuranjan8057@gmail.com

Whatsapp: +91 8057754706



Follow Us

Facebook Logo    Instagram Logo