Skip to content

Commit 1c39012

Browse files
Merge pull request #281 from algokelvin-373/production/v1.0.1 to MASTER
Production/v1.0.1 to master
2 parents 54aa5fa + 36ce143 commit 1c39012

File tree

167 files changed

+3751
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+3751
-12
lines changed

ActionEveryMinute/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
.idea
5+
.DS_Store
6+
/build
7+
/captures
8+
.externalNativeBuild
9+
.cxx
10+
local.properties

ActionEveryMinute/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Action Every Minute
2+
3+
| ![Gambar 1](./documentation/SS01_ActionEveryMinute.jpg) | ![Gambar 2](./documentation/SS02_ActionEveryMinute.jpg) | ![Gambar 3](./documentation/SS03_ActionEveryMinute.jpg) |
4+
|:-------------------------------------------------------:|:-------------------------------------------------------:|:-------------------------------------------------------:|
5+
| Gambar 1: <br> Begin Action | Gambar 2: <br> Start Action | Gambar 3: <br> Action until 5 Times |
6+
7+
## Environment
8+
<table>
9+
<tr>
10+
<td>Android Gradle Plugins Version</td>
11+
<td>Gradle Version</td>
12+
<td>Java JDK</td>
13+
</tr>
14+
<tr>
15+
<td>7.2.2</td>
16+
<td>7.3.3</td>
17+
<td>17</td>
18+
</tr>
19+
</table>
20+
21+
## Contributors
22+
Thanks all contributors for build this repository
23+
24+
```
25+
Copyright [2021] [The Dictionary of Android Projects]
26+
27+
Licensed under the Apache License, Version 2.0 (the "License");
28+
you may not use this file except in compliance with the License.
29+
You may obtain a copy of the License at
30+
31+
http://www.apache.org/licenses/LICENSE-2.0
32+
33+
Unless required by applicable law or agreed to in writing, software
34+
distributed under the License is distributed on an "AS IS" BASIS,
35+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36+
See the License for the specific language governing permissions and
37+
limitations under the License.
38+
39+
```

ActionEveryMinute/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

ActionEveryMinute/app/build.gradle

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
}
5+
6+
android {
7+
compileSdk 32
8+
9+
defaultConfig {
10+
applicationId "algokelvin.app.actioneveryminute"
11+
minSdk 21
12+
targetSdk 32
13+
versionCode 1
14+
versionName "1.0"
15+
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
compileOptions {
26+
sourceCompatibility JavaVersion.VERSION_1_8
27+
targetCompatibility JavaVersion.VERSION_1_8
28+
}
29+
kotlinOptions {
30+
jvmTarget = '1.8'
31+
}
32+
buildFeatures {
33+
viewBinding = true
34+
}
35+
}
36+
37+
dependencies {
38+
implementation 'androidx.core:core-ktx:1.7.0'
39+
implementation 'androidx.appcompat:appcompat:1.5.1'
40+
implementation 'com.google.android.material:material:1.6.1'
41+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
42+
testImplementation 'junit:junit:4.13.2'
43+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
44+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
45+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package algokelvin.app.actioneveryminute
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("algokelvin.app.actioneveryminute", appContext.packageName)
23+
}
24+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="algokelvin.app.actioneveryminute">
5+
6+
<application
7+
android:allowBackup="true"
8+
android:dataExtractionRules="@xml/data_extraction_rules"
9+
android:fullBackupContent="@xml/backup_rules"
10+
android:icon="@mipmap/ic_launcher"
11+
android:label="@string/app_name"
12+
android:roundIcon="@mipmap/ic_launcher_round"
13+
android:supportsRtl="true"
14+
android:theme="@style/Theme.ActionEveryMinute"
15+
tools:targetApi="31">
16+
<activity
17+
android:name=".MainActivity"
18+
android:exported="true">
19+
<intent-filter>
20+
<action android:name="android.intent.action.MAIN" />
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
24+
</application>
25+
26+
</manifest>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package algokelvin.app.actioneveryminute;
2+
3+
import android.os.Bundle;
4+
5+
import androidx.annotation.Nullable;
6+
import androidx.appcompat.app.AppCompatActivity;
7+
8+
abstract public class BindingActivity<T> extends AppCompatActivity {
9+
abstract protected void mainUI();
10+
abstract protected void contentView();
11+
12+
protected T binding;
13+
14+
@Override
15+
protected void onCreate(@Nullable Bundle savedInstanceState) {
16+
super.onCreate(savedInstanceState);
17+
contentView();
18+
mainUI();
19+
}
20+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package algokelvin.app.actioneveryminute
2+
3+
import algokelvin.app.actioneveryminute.databinding.ActivityMainBinding
4+
import java.util.*
5+
6+
class MainActivity : BindingActivity<ActivityMainBinding>(), UiThreadInterface {
7+
private var times = 1
8+
9+
override fun contentView() {
10+
binding = ActivityMainBinding.inflate(layoutInflater)
11+
setContentView(binding.root)
12+
}
13+
14+
override fun mainUI() {
15+
val timer = Timer()
16+
timer.scheduleAtFixedRate(object : TimerTask() {
17+
override fun run() {
18+
runOnUiThread {
19+
uiThread()
20+
}
21+
}
22+
}, 5000, 5000)
23+
}
24+
25+
override fun uiThread() {
26+
binding.txtRun.text = ("${times++} Times")
27+
}
28+
29+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package algokelvin.app.actioneveryminute
2+
3+
interface UiThreadInterface {
4+
fun uiThread()
5+
}

0 commit comments

Comments
 (0)