Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meser
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Suryono
meser
Commits
015c7811
Commit
015c7811
authored
Aug 25, 2020
by
Muhammad Suryono
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cart' into dev
parents
22083683
7e54d858
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
20 deletions
+51
-20
SplashScreen.java
app/src/main/java/com/yono/messeripos/SplashScreen.java
+18
-3
ToolbarApp.java
app/src/main/java/com/yono/messeripos/ToolbarApp.java
+1
-0
fade_in.xml
app/src/main/res/anim/fade_in.xml
+8
-0
translate.xml
app/src/main/res/anim/translate.xml
+7
-0
zoom_in.xml
app/src/main/res/anim/zoom_in.xml
+0
-13
activity_splash.xml
app/src/main/res/layout/activity_splash.xml
+17
-4
No files found.
app/src/main/java/com/yono/messeripos/SplashScreen.java
View file @
015c7811
...
@@ -6,16 +6,21 @@ import android.content.SharedPreferences;
...
@@ -6,16 +6,21 @@ import android.content.SharedPreferences;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.os.Looper
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.view.animation.Animation
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
android.view.animation.AnimationUtils
;
import
android.view.animation.ScaleAnimation
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
com.google.android.material.textview.MaterialTextView
;
public
class
SplashScreen
extends
AppCompatActivity
{
public
class
SplashScreen
extends
AppCompatActivity
{
ImageView
img
;
ImageView
img
;
MaterialTextView
textView
;
SharedPreferences
sharedPreferences
;
SharedPreferences
sharedPreferences
;
public
static
final
String
MY_SHARED_PREFERENCES
=
"my_shared_preferences"
;
public
static
final
String
MY_SHARED_PREFERENCES
=
"my_shared_preferences"
;
public
static
final
String
SESSION
=
"session"
;
public
static
final
String
SESSION
=
"session"
;
...
@@ -29,13 +34,23 @@ public class SplashScreen extends AppCompatActivity {
...
@@ -29,13 +34,23 @@ public class SplashScreen extends AppCompatActivity {
setContentView
(
R
.
layout
.
activity_splash
);
setContentView
(
R
.
layout
.
activity_splash
);
img
=
findViewById
(
R
.
id
.
image_splash
);
img
=
findViewById
(
R
.
id
.
image_splash
);
textView
=
findViewById
(
R
.
id
.
messer_id
);
// Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_in);
Animation
animation
=
AnimationUtils
.
loadAnimation
(
getApplicationContext
(),
R
.
anim
.
translate
);
// img.startAnimation(animation);
img
.
startAnimation
(
animation
);
new
Handler
().
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
textView
.
setVisibility
(
View
.
VISIBLE
);
Animation
txt
=
AnimationUtils
.
loadAnimation
(
getApplicationContext
(),
R
.
anim
.
fade_in
);
textView
.
startAnimation
(
txt
);
}
},
700
);
sharedPreferences
=
getSharedPreferences
(
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
sharedPreferences
=
getSharedPreferences
(
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
session
=
sharedPreferences
.
getBoolean
(
SESSION
,
false
);
session
=
sharedPreferences
.
getBoolean
(
SESSION
,
false
);
new
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(()->{
new
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(()->{
if
(
session
){
if
(
session
){
startActivity
(
new
Intent
(
SplashScreen
.
this
,
MainActivity
.
class
));
startActivity
(
new
Intent
(
SplashScreen
.
this
,
MainActivity
.
class
));
...
@@ -44,6 +59,6 @@ public class SplashScreen extends AppCompatActivity {
...
@@ -44,6 +59,6 @@ public class SplashScreen extends AppCompatActivity {
startActivity
(
new
Intent
(
SplashScreen
.
this
,
LoginActivity
.
class
));
startActivity
(
new
Intent
(
SplashScreen
.
this
,
LoginActivity
.
class
));
finish
();
finish
();
}
}
},
3
0
00
);
},
3
5
00
);
}
}
}
}
app/src/main/java/com/yono/messeripos/ToolbarApp.java
View file @
015c7811
...
@@ -7,4 +7,5 @@ import com.google.android.material.appbar.MaterialToolbar;
...
@@ -7,4 +7,5 @@ import com.google.android.material.appbar.MaterialToolbar;
public
class
ToolbarApp
{
public
class
ToolbarApp
{
}
}
app/src/main/res/anim/fade_in.xml
0 → 100644
View file @
015c7811
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<alpha
android:fromAlpha=
"0.0"
android:toAlpha=
"1.0"
android:duration=
"2000"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/translate.xml
0 → 100644
View file @
015c7811
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
android:duration=
"700"
android:fromYDelta=
"50%"
android:toYDelta=
"1%"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/zoom_in.xml
deleted
100644 → 0
View file @
22083683
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<scale
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:fromXScale=
"0.5"
android:toXScale=
"2.0"
android:fromYScale=
"0.5"
android:toYScale=
"2.0"
android:duration=
"3000"
android:pivotX=
"50%"
android:pivotY=
"50%"
>
</scale>
</set>
app/src/main/res/layout/activity_splash.xml
View file @
015c7811
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
...
@@ -7,12 +8,24 @@
...
@@ -7,12 +8,24 @@
<ImageView
<ImageView
android:id=
"@+id/image_splash"
android:id=
"@+id/image_splash"
android:layout_width=
"1
0
0dp"
android:layout_width=
"1
5
0dp"
android:layout_height=
"1
0
0dp"
android:layout_height=
"1
5
0dp"
android:src=
"@drawable/ic_meser_icon"
android:src=
"@drawable/ic_meser_icon"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraint
End_toEndOf=
"parent"
/>
app:layout_constraint
Top_toTopOf=
"parent"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/messer_id"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/poppins_bold"
android:visibility=
"gone"
android:text=
"messer.id"
android:textColor=
"@color/colorWhite"
android:textSize=
"24sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/image_splash"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment