diff --git a/app/build.gradle b/app/build.gradle index 30216a3..281c610 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -52,25 +52,33 @@ android { } +repositories { + google() + mavenCentral() +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.core:core-ktx:1.3.2' + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0" implementation 'com.github.doyaaaaaken:kotlin-csv-jvm:0.11.1' implementation 'com.github.wrdlbrnft:sorted-list-adapter:0.3.0.27' implementation "androidx.cardview:cardview:1.0.0" - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.1' + implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' + implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' - implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.recyclerview:recyclerview:1.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'com.google.android.material:material:1.4.0' + implementation 'com.github.bumptech.glide:glide:4.12.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" } diff --git a/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt b/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt index e6d081b..bd7e0f5 100644 --- a/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt +++ b/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt @@ -12,18 +12,24 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Button +import android.widget.ImageView import android.widget.TextView import android.widget.Toast import androidx.fragment.app.Fragment +import androidx.swiperefreshlayout.widget.CircularProgressDrawable +import com.bumptech.glide.Glide import com.illusionware.npsbrowser.AppData import com.illusionware.npsbrowser.R -import java.lang.Exception class SingleAppFragment : Fragment() { + private val baseStoreURL = "https://store.playstation.com/store/api/chihiro/00_09_000/container" + companion object { lateinit var app : AppData } + // TODO: either use binding or make vars for all the views + override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -59,25 +65,37 @@ class SingleAppFragment : Fragment() { view?.findViewById(R.id.singleAppContentId)?.setOnLongClickListener { val clipboardManager = requireActivity().getSystemService(CLIPBOARD_SERVICE) as ClipboardManager - val clipData = ClipData.newPlainText("Content ID", view?.findViewById(R.id.singleAppContentId)?.text) + val clipData = ClipData.newPlainText( + "Content ID", + view?.findViewById(R.id.singleAppContentId)?.text + ) clipboardManager.setPrimaryClip(clipData) Toast.makeText(requireContext(), "Content ID Copied to Clipboard!", Toast.LENGTH_SHORT).show() true } + // click listener for the download button view?.findViewById