Manifest file किसी भी Android app का मुख्य Configuration File होती है। यह फ़ाइल App Components, Permissions, Hardware Features, और App Metadata को define करती है।
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.myapp"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="MyApp" android:theme="@style/Theme.MyApp"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
Layout Resources वह XML files होती हैं, जो app के UI (User Interface) को define करती हैं। ये files res/layout/ folder में होती हैं।
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="16dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello, World!" android:textSize="20sp" android:textColor="#000000"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click Me" /> </LinearLayout>
AndroidManifest.xml में जो activity define की गई है, वह layout XML file से connected होती है।
setContentView(R.layout.activity_main);
इसका मतलब activity_main.xml को UI के लिए load करना।
हैलो दोस्तों! उम्मीद करता हूं आपको हमारा यह content/post पसंद आया होगा। अगर आपको हमारा ये content/post पसंद आई हो तो अपने दोस्तों के पास भी share करे। और अगर आपको कोई problem या कोई specific content हिन्दी में चाहिए है तो आप हमें नीचे दिए गए Email या whatsapp number के जरिए बता सकते है।
अगर आप CCC/diploma/polytechnic/MCA/BCA etc कर रहे है तो ये website स्पेशली आपके लिए ही है, जो student हिंदी में पढ़ाई करते है।
Email: deepanshuranjan8057@gmail.com
Whatsapp: +91 8057754706