Instructions: Refactor your previous application to use a single activity along with 2 Fragments instead of 2 activities. You will then generate a signed APK with a new version number....

All explanation is on the attachment. Coding Language: Kotlin


Instructions: Refactor your previous application to use a single activity along with 2 Fragments instead of 2 activities. You will then generate a signed APK with a new version number. =========================================================== 1. Create a new branch of your previous assignment’s git repository If your previous application was incomplete, email the instructor about getting a working implementation to use as a stating point. =========================================================== 2. Rename your SelectionActivity to MainActivity. Your application will no longer use the DisplayActivity, so delete it from your project (once you’ve moved over any code you’d like to reuse). =========================================================== 3. Create 2 fragment classes – SelectionFragment (your ‘list’ fragment), and DisplayFragment (your ‘details’ fragment). Your SelectionFragment will be used to click an image displayed in a RecyclerView (the same function previously performed by your SelectionActivity), and the DisplayFragment will show the image and description of a clicked image (the same function previously performed by your DisplayActivity). =========================================================== 4. Add two FragmentContainerView views to your main activity’s layout. You can arrange these containers however you would like. Do not specify the fragments instances in the layout directly (remove any android:name properties from the views). Instead we will use FragmentTransactions to add them at runtime. =========================================================== 5. When your main activity is launched, create one instance of each of your fragment types, and place them in the two FragmentContainerView containers in your activity’s layout. =========================================================== 6. Your SelectionFragment class must use a Factory Method to generate a new instance. The factory method should be provided with the collection of elements to display. Your DisplayFragment class must not use a factory method, since it does not need any information to set itself up when it is attached to the activity. =========================================================== 7. Use a ViewModel (along with the associated LiveData object(s)) to facilitate the display of the image and description in the DisplayFragment whenever an image is clicked in the SelectionFragment. =========================================================== 8. Once your application has been tested, update the version number and generate a new APK 8-1. Modify the file build.gradle (Module:app) found under Gradle Scripts in the project view Under defaultConfig, change versionCode to 2, and versionName to 1.0.1-fragments 8-2. Click on Build and select Generate Signed Bundle/APK 8-3. Follow the steps for creating a new APK, but when requested, locate the certificate you generated during a previous lab and use it to generate this new version of your app. Please note: If you are unable to find your previous key store, or are unable to recall one or both passwords, then you can create a new key store and key. Keep in mind however that had this application been previously published on an app distribution platform, it’s possible you would have lost the ability to update the application currently deployed andwould instead have to change the package name (your apps unique identifier), lose your current user base, and start all over. 8-4. Follow any other dialogs to complete building the APK 8-5. Locate and rename your generated APK to imagechooser-release-1.0.1.apk 8-6. Do a final push of your project to GitHub and submit the repository URL along with the signed APK file to Canvas. SelectionActivity.kt-master/.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 SelectionActivity.kt-master/.idea/.gitignore # Default ignored files /shelf/ /workspace.xml SelectionActivity.kt-master/.idea/.name SelectionActivity.kt SelectionActivity.kt-master/.idea/compiler.xml SelectionActivity.kt-master/.idea/deploymentTargetDropDown.xml SelectionActivity.kt-master/.idea/gradle.xml SelectionActivity.kt-master/.idea/misc.xml SelectionActivity.kt-master/app/.gitignore /build SelectionActivity.kt-master/app/build.gradle plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdk 31 defaultConfig { applicationId "edu.temple.selectionactivity" minSdk 30 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.6.0' implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.1' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } SelectionActivity.kt-master/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 SelectionActivity.kt-master/app/release/app-release.apk META-INF/com/android/build/gradle/app-metadata.properties appMetadataVersion=1.0 androidGradlePluginVersion=7.0.2 META-INF/androidx.activity_activity.version 1.2.4 META-INF/androidx.annotation_annotation-experimental.version 1.1.0 META-INF/androidx.appcompat_appcompat-resources.version 1.3.1 META-INF/androidx.appcompat_appcompat.version 1.3.1 META-INF/androidx.arch.core_core-runtime.version 2.1.0 META-INF/androidx.cardview_cardview.version 1.0.0 META-INF/androidx.coordinatorlayout_coordinatorlayout.version 1.1.0 META-INF/androidx.core_core-ktx.version 1.6.0 META-INF/androidx.core_core.version 1.6.0 META-INF/androidx.cursoradapter_cursoradapter.version 1.0.0 META-INF/androidx.customview_customview.version 1.0.0 META-INF/androidx.documentfile_documentfile.version 1.0.0 META-INF/androidx.drawerlayout_drawerlayout.version 1.0.0 META-INF/androidx.dynamicanimation_dynamicanimation.version 1.0.0 META-INF/androidx.fragment_fragment.version 1.3.6 META-INF/androidx.interpolator_interpolator.version 1.0.0 META-INF/androidx.legacy_legacy-support-core-utils.version 1.0.0 META-INF/androidx.lifecycle_lifecycle-livedata-core.version 2.3.1 META-INF/androidx.lifecycle_lifecycle-livedata.version 2.0.0 META-INF/androidx.lifecycle_lifecycle-runtime.version 2.3.1 META-INF/androidx.lifecycle_lifecycle-viewmodel-savedstate.version 2.3.1 META-INF/androidx.lifecycle_lifecycle-viewmodel.version 2.3.1 META-INF/androidx.loader_loader.version 1.0.0 META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version 1.0.0 META-INF/androidx.print_print.version 1.0.0 META-INF/androidx.recyclerview_recyclerview.version 1.1.0 META-INF/androidx.savedstate_savedstate.version 1.1.0 META-INF/androidx.tracing_tracing.version 1.0.0 META-INF/androidx.transition_transition.version 1.2.0 META-INF/androidx.vectordrawable_vectordrawable-animated.version 1.1.0 META-INF/androidx.vectordrawable_vectordrawable.version 1.1.0 META-INF/androidx.versionedparcelable_versionedparcelable.version 1.1.1 META-INF/androidx.viewpager2_viewpager2.version 1.0.0 META-INF/androidx.viewpager_viewpager.version 1.0.0 META-INF/com.google.android.material_material.version 1.4.0 kotlin/annotation/annotation.kotlin_builtins kotlin/collections/collections.kotlin_builtins kotlin/coroutines/coroutines.kotlin_builtins kotlin/internal/internal.kotlin_builtins kotlin/kotlin.kotlin_builtins kotlin/ranges/ranges.kotlin_builtins kotlin/reflect/reflect.kotlin_builtins classes.dex res/yx.xml res/lJ.xml res/iw.xml res/DP.xml res/VK.9.png res/jH.xml res/Za.xml res/color/mtrl_tabs_icon_color_selector_colored.xml res/color-night-v8/material_timepicker_clockface.xml res/E7.xml res/Q1.9.png res/color/design_icon_tint.xml res/bC.xml res/color/material_on_surface_disabled.xml res/Xs.9.png res/gV.9.png res/ld.9.png res/FM.9.png res/Jo.xml res/OK.xml res/Mb.png res/HA.xml res/2C.9.png res/color-night-v8/material_timepicker_button_stroke.xml res/v8.xml res/vz.xml res/vD.xml res/color/abc_search_url_text.xml res/jR.xml res/rt.xml res/jK.jpg res/93.9.png res/color/material_on_surface_emphasis_medium.xml res/J71.xml res/xC.webp res/Ly1.xml res/4r.png res/XM.xml res/HJ.xml res/o-.xml res/color-night-v8/material_timepicker_modebutton_tint.xml res/FG.png res/4C.xml res/Jn.xml res/30.xml res/color-v23/abc_tint_btn_checkable.xml res/color-v23/abc_tint_edittext.xml res/fr.9.png res/O9.xml res/color/mtrl_calendar_selected_range.xml res/o1.xml res/M3.xml res/rJ.xml res/on.xml res/color/mtrl_btn_text_btn_bg_color_selector.xml res/K3.xml res/YU.jpg res/VW.png res/e1.xml res/33.9.png res/Yt.9.png res/1y.xml res/color/abc_secondary_text_material_light.xml res/Fx1.9.png res/N9.xml res/X3.9.png res/iP.webp res/ns.png res/Tl.9.png res/2D1.xml res/6E.png res/Di.xml res/Ru.xml res/R5.xml res/9t.png res/U_.png res/xy.xml res/color/mtrl_choice_chip_ripple_color.xml res/5J.png res/QD.9.png res/f9.png res/hu.xml res/AB.9.png res/color-v23/abc_btn_colored_borderless_text_material.xml res/color/abc_primary_text_material_light.xml res/2p.xml res/color/test_mtrl_calendar_day_selected.xml res/ue.xml res/U3.xml res/I3.png res/color/mtrl_chip_close_icon_tint.xml res/ee.png res/co.webp res/color/material_slider_active_tick_marks_color.xml res/YH.9.png res/M4.xml res/Of.9.png res/SQ.xml res/Xp.9.png res/r0.xml res/color/checkbox_themeable_attribute_color.xml res/Of.xml res/72.9.png res/B8.xml res/TK.xml res/65.xml res/t9.xml res/0I.png res/V-.9.png res/3B.xml res/n6.xml res/Fl.xml res/color/mtrl_tabs_icon_color_selector.xml res/lG.xml res/tM.9.png res/color/material_on_surface_emphasis_high_type.xml res/vy.9.png res/4_.9.png res/Qw.xml res/YQ.xml res/1V.xml res/3m.xml res/dv.9.png res/Fg.xml
Oct 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here