Q1 Using Android Studio do the following and run both exampl

Q1) Using Android Studio do the following:

and run both examples separately.

b) Build APK files.

c) Modify and/or create java code in the MainActivity.java file so that the interface widget implements some “Action” when the application runs. For example, you might create a simple button, that, when clicked, changes color. Or, you might have a text field that when a button is clicked, the text changes in some way (i.e., is stored, is deleted, etc…). Also, be sure to study and understand how the widgets that you create are described in the activity_main.xml file (This step has to be implemented effectively).

d) Attach screenshots of the following project elements and upload

1.Test of application

2. Activity_main.xml (code and design)

3. MainActivity.java (code)

4. Other screenshots as necessary

https //bitbucket.org/budi-kurniawan/android-tutorial-eramples/ src

Solution

Answer:

MainActivity.java

package com.example.helloworld;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity
{
   @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
  
       setContentView(R.layout.activity_main);
   }
  
  
}

activity_main.xml :

<LinearLayout
xmlns:android=\"http://schemas.android.com/apk/res/android\"
android:layout_width=\"match_parent\"
android:layout_height=\"match_parent\"
android:orientation=\"vertical\"
>
  
<TextView
android:layout_width=\"match_parent\"
android:layout_height=\"wrap_content\"
android:text=\"Welcome 2 Durgasoft \"
android:textSize=\"30sp\"
/>

</LinearLayout>

AndriodManifest.xml:

<?xml version=\"1.0\" encoding=\"utf-8\"?>
<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"
package=\"com.example.helloworld\"
android:versionCode=\"1\"
android:versionName=\"1.0\" >

<uses-sdk
android:minSdkVersion=\"8\"
android:targetSdkVersion=\"17\" />

<application
android:allowBackup=\"true\"
android:icon=\"@drawable/ic_launcher\"
android:label=\"@string/app_name\"
android:theme=\"@style/AppTheme\" >
<activity
android:name=\"com.example.helloworld.MainActivity\"
android:label=\"@string/app_name\" >
<intent-filter>
<action android:name=\"android.intent.action.MAIN\" />

<category android:name=\"android.intent.category.LAUNCHER\" />
</intent-filter>
</activity>
</application>

</manifest>

Q1) Using Android Studio do the following: and run both examples separately. b) Build APK files. c) Modify and/or create java code in the MainActivity.java file
Q1) Using Android Studio do the following: and run both examples separately. b) Build APK files. c) Modify and/or create java code in the MainActivity.java file

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site