See word document in the zip file
Module 4-1-2/~$dule 4 Homework Assignment 1.docx Module 4-1-2/HWA2_MD.zip HWA2_MD/.gitignore *.iml .gradle /local.properties /.idea/caches /.idea/libraries /.idea/modules.xml /.idea/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml .DS_Store /build /captures .externalNativeBuild .cxx local.properties HWA2_MD/app/.gitignore /build HWA2_MD/app/build.gradle plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdk 31 defaultConfig { applicationId "Deeney.m_northeastern.edu" minSdk 21 targetSdk 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } HWA2_MD/app/proguard-rules.pro # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile HWA2_MD/app/src/androidTest/java/Deeney/m_northeastern/edu/ExampleInstrumentedTest.kt package Deeney.m_northeastern.edu import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 import org.junit.Test import org.junit.runner.RunWith import org.junit.Assert.* /** * Instrumented test, which will execute on an Android device. * * See [testing documentation](http://d.android.com/tools/testing). */ @RunWith(AndroidJUnit4::class) class ExampleInstrumentedTest { @Test fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext assertEquals("Deeney.m_northeastern.edu", appContext.packageName) } } HWA2_MD/app/src/main/AndroidManifest.xml HWA2_MD/app/src/main/java/Deeney/m_northeastern/edu/MainActivity.kt package Deeney.m_northeastern.edu import android.os.Bundle import android.util.Log import android.widget.Button import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) // get reference to button val btn_click_me = findViewById(R.id.button) as Button // set on-click listener btn_click_me.setOnClickListener { // your code to perform when the user clicks on the button Toast.makeText(this@MainActivity, "
[email protected].\n ", Toast.LENGTH_SHORT).show() Log.i("Function Name","Function btn_click_me.setOnClickListener ") } } } HWA2_MD/app/src/main/res/drawable/ic_launcher_background.xml HWA2_MD/app/src/main/res/drawable-v24/ic_launcher_foreground.xml HWA2_MD/app/src/main/res/layout/activity_main.xml HWA2_MD/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml HWA2_MD/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml HWA2_MD/app/src/main/res/mipmap-hdpi/ic_launcher.webp HWA2_MD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp HWA2_MD/app/src/main/res/mipmap-mdpi/ic_launcher.webp HWA2_MD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp HWA2_MD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp HWA2_MD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp HWA2_MD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp HWA2_MD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp HWA2_MD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp HWA2_MD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp HWA2_MD/app/src/main/res/values/colors.xml #FFBB86FC #FF6200EE #FF3700B3 #FF03DAC5 #FF018786 #FF000000 #FFFFFFFF HWA2_MD/app/src/main/res/values/strings.xml HWA2_YourInitials HWA2_MD/app/src/main/res/values/themes.xml @color/purple_500 @color/purple_700 @color/white @color/teal_200 @color/teal_700 @color/black ?attr/colorPrimaryVariant HWA2_MD/app/src/main/res/values-night/themes.xml @color/purple_200 @color/purple_700 @color/black @color/teal_200 @color/teal_200 @color/black ?attr/colorPrimaryVariant HWA2_MD/app/src/test/java/Deeney/m_northeastern/edu/ExampleUnitTest.kt package Deeney.m_northeastern.edu import org.junit.Test import org.junit.Assert.* /** * Example local unit test, which will execute on the development machine (host). * * See [testing documentation](http://d.android.com/tools/testing). */ class ExampleUnitTest { @Test fun addition_isCorrect() { assertEquals(4, 2 + 2) } } HWA2_MD/build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:7.0.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } task clean(type: Delete) { delete rootProject.buildDir } HWA2_MD/gradle/wrapper/gradle-wrapper.jar META-INF/MANIFEST.MF Manifest-Version: 1.0 Implementation-Title: Gradle Wrapper org/gradle/wrapper/BootstrapMainStarter$1.class package org.gradle.wrapper; synchronized class BootstrapMainStarter$1 implements java.io.FilenameFilter { void BootstrapMainStarter$1(); public boolean accept(java.io.File, String); } org/gradle/wrapper/BootstrapMainStarter.class package org.gradle.wrapper; public synchronized class BootstrapMainStarter { public void BootstrapMainStarter(); public void start(String[], java.io.File) throws Exception; static java.io.File findLauncherJar(java.io.File); } org/gradle/wrapper/Download$1.class package org.gradle.wrapper; synchronized class Download$1 { } org/gradle/wrapper/Download$DefaultDownloadProgressListener.class package org.gradle.wrapper; synchronized class Download$DefaultDownloadProgressListener implements DownloadProgressListener { private final Logger logger; private final DownloadProgressListener delegate; private int previousDownloadPercent; public void Download$DefaultDownloadProgressListener(Logger, DownloadProgressListener); public void downloadStatusChanged(java.net.URI, long, long); private void appendPercentageSoFar(long, long); private int calculateDownloadPercent(long, long); } org/gradle/wrapper/Download$ProxyAuthenticator.class package org.gradle.wrapper; synchronized class Download$ProxyAuthenticator extends java.net.Authenticator { private void Download$ProxyAuthenticator(); protected java.net.PasswordAuthentication getPasswordAuthentication(); } org/gradle/wrapper/Download.class package org.gradle.wrapper; public synchronized class Download implements IDownload { public static final