diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 00000000..16dcd122 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,33 @@ +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Log/OS Files +*.log + +# Android Studio generated files and folders +captures/ +.externalNativeBuild/ +.cxx/ +*.apk +output.json + +# IntelliJ +*.iml +.idea/ +misc.xml +deploymentTargetDropDown.xml +render.experimental.xml + +# Keystore files +*.jks +*.keystore + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Android Profiling +*.hprof \ No newline at end of file diff --git a/app/app/.editorconfig b/app/app/.editorconfig new file mode 100644 index 00000000..86a14cae --- /dev/null +++ b/app/app/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/app/app/.gitignore b/app/app/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/app/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/app/build.gradle b/app/app/build.gradle new file mode 100644 index 00000000..2adb0a81 --- /dev/null +++ b/app/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + compileSdk 32 + + defaultConfig { + applicationId "me.rxresu.app" + minSdk 21 + targetSdk 32 + 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' + } + buildFeatures { + viewBinding true + } +} + +dependencies { + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} diff --git a/app/app/proguard-rules.pro b/app/app/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/app/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 \ No newline at end of file diff --git a/app/app/src/main/AndroidManifest.xml b/app/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2325060a --- /dev/null +++ b/app/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/app/app/src/main/ic_launcher-playstore.png b/app/app/src/main/ic_launcher-playstore.png new file mode 100644 index 00000000..ef2861c3 Binary files /dev/null and b/app/app/src/main/ic_launcher-playstore.png differ diff --git a/app/app/src/main/java/me/rxresu/app/MainActivity.kt b/app/app/src/main/java/me/rxresu/app/MainActivity.kt new file mode 100644 index 00000000..9d8ad884 --- /dev/null +++ b/app/app/src/main/java/me/rxresu/app/MainActivity.kt @@ -0,0 +1,85 @@ +package me.rxresu.app + +import android.annotation.SuppressLint +import android.graphics.Bitmap +import android.os.Bundle +import android.view.KeyEvent +import android.webkit.WebResourceError +import android.webkit.WebResourceRequest +import android.webkit.WebView +import android.webkit.WebViewClient +import androidx.appcompat.app.AppCompatActivity +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout + +class MainActivity : AppCompatActivity() { + + private lateinit var webView: WebView + private lateinit var swipeLayout: SwipeRefreshLayout + + private var isLoaded: Boolean = false + private var webURL = "https://beta.rxresu.me" + + @SuppressLint("SetJavaScriptEnabled") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + webView = findViewById(R.id.webview) + swipeLayout = findViewById(R.id.swipelayout) + + webView.settings.javaScriptEnabled = true + webView.settings.userAgentString = "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Mobile Safari/537.36" + + swipeLayout.setOnRefreshListener { + webView.reload() + + swipeLayout.isRefreshing = false + } + } + + override fun onResume() { + if (!isLoaded) loadWebView() + + super.onResume() + } + + private fun loadWebView() { + webView.loadUrl(webURL) + + webView.webViewClient = object : WebViewClient() { + override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { + val url = request?.url.toString() + view?.loadUrl(url) + return super.shouldOverrideUrlLoading(view, request) + } + + override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) { + super.onPageStarted(view, url, favicon) + } + + override fun onPageFinished(view: WebView?, url: String?) { + isLoaded = true + super.onPageFinished(view, url) + } + + override fun onReceivedError(view: WebView, request: WebResourceRequest, error: WebResourceError) { + isLoaded = false + super.onReceivedError(view, request, error) + } + } + } + + override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { + if (event.action == KeyEvent.ACTION_DOWN) { + if (keyCode == KeyEvent.KEYCODE_BACK) { + if (webView.canGoBack()) { + webView.goBack() + } + + return true + } + } + + return super.onKeyDown(keyCode, event) + } +} diff --git a/app/app/src/main/res/layout/activity_main.xml b/app/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..b1ce2b18 --- /dev/null +++ b/app/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/app/src/main/res/layout/content_main.xml b/app/app/src/main/res/layout/content_main.xml new file mode 100644 index 00000000..05951302 --- /dev/null +++ b/app/app/src/main/res/layout/content_main.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/app/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/app/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..91830192 Binary files /dev/null and b/app/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..32312634 Binary files /dev/null and b/app/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..966baa42 Binary files /dev/null and b/app/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..fe4857c9 Binary files /dev/null and b/app/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..7b17b97f Binary files /dev/null and b/app/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..063a4c84 Binary files /dev/null and b/app/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..25d8bf42 Binary files /dev/null and b/app/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..ae0fa803 Binary files /dev/null and b/app/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..14424fc3 Binary files /dev/null and b/app/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..3d3d5b8d Binary files /dev/null and b/app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..7c5959f4 Binary files /dev/null and b/app/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..618a6332 Binary files /dev/null and b/app/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4f931699 Binary files /dev/null and b/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..4ddb06f7 Binary files /dev/null and b/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..862a03de Binary files /dev/null and b/app/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/app/src/main/res/values/ic_launcher_background.xml b/app/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..c5d5899f --- /dev/null +++ b/app/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/app/app/src/main/res/values/strings.xml b/app/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..14dd8a46 --- /dev/null +++ b/app/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Reactive Resume + diff --git a/app/app/src/main/res/values/themes.xml b/app/app/src/main/res/values/themes.xml new file mode 100644 index 00000000..ea6cbf29 --- /dev/null +++ b/app/app/src/main/res/values/themes.xml @@ -0,0 +1,12 @@ + + + +