This repository has been archived by the owner on Aug 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
148697e
commit 0cdc7d6
Showing
27 changed files
with
587 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/src/main/java/id/husni/covninfo/activity/SplashActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package id.husni.covninfo.activity; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.os.Handler; | ||
import android.view.Window; | ||
import android.view.WindowManager; | ||
|
||
import id.husni.covninfo.R; | ||
|
||
public class SplashActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
requestWindowFeature(Window.FEATURE_NO_TITLE); | ||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, | ||
WindowManager.LayoutParams.FLAG_FULLSCREEN); | ||
setContentView(R.layout.activity_splash); | ||
new Handler().postDelayed(new Runnable() { | ||
@Override | ||
public void run() { | ||
Intent intent = new Intent(SplashActivity.this, MainActivity.class); | ||
startActivity(intent); | ||
finish(); | ||
} | ||
}, 1500); // 1,5 Detik Loading Splash Screen | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
app/src/main/java/id/husni/covninfo/model/IdnSummaryModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
package id.husni.covninfo.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class IdnSummaryModel { | ||
@SerializedName("lastUpdate") | ||
private String lastUpdate; | ||
@SerializedName("confirmed") | ||
private IdnConfirmed idnConfirmed; | ||
@SerializedName("recovered") | ||
private IdnRecovered idnRecovered; | ||
@SerializedName("deaths") | ||
private IdnDeaths idnDeaths; | ||
|
||
public IdnSummaryModel(String lastUpdate, IdnConfirmed idnConfirmed, IdnDeaths idnDeaths, IdnRecovered idnRecovered) { | ||
this.lastUpdate = lastUpdate; | ||
this.idnConfirmed = idnConfirmed; | ||
this.idnDeaths = idnDeaths; | ||
this.idnRecovered = idnRecovered; | ||
} | ||
|
||
public String getLastUpdate() { | ||
return lastUpdate; | ||
} | ||
|
||
public void setLastUpdate(String lastUpdate) { | ||
this.lastUpdate = lastUpdate; | ||
} | ||
|
||
public IdnConfirmed getIdnConfirmed() { | ||
return idnConfirmed; | ||
} | ||
|
||
public void setIdnConfirmed(IdnConfirmed idnConfirmed) { | ||
this.idnConfirmed = idnConfirmed; | ||
} | ||
|
||
public IdnDeaths getIdnDeaths() { | ||
return idnDeaths; | ||
} | ||
|
||
public void setIdnDeaths(IdnDeaths idnDeaths) { | ||
this.idnDeaths = idnDeaths; | ||
} | ||
|
||
public IdnRecovered getIdnRecovered() { | ||
return idnRecovered; | ||
} | ||
|
||
public void setIdnRecovered(IdnRecovered idnRecovered) { | ||
this.idnRecovered = idnRecovered; | ||
} | ||
|
||
public class IdnConfirmed { | ||
@SerializedName("value") | ||
private int value; | ||
@SerializedName("detail") | ||
private String detail; | ||
|
||
public IdnConfirmed(int value, String detail) { | ||
this.value = value; | ||
this.detail = detail; | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(int value) { | ||
this.value = value; | ||
} | ||
|
||
public String getDetail() { | ||
return detail; | ||
} | ||
|
||
public void setDetail(String detail) { | ||
this.detail = detail; | ||
} | ||
} | ||
|
||
public class IdnDeaths { | ||
@SerializedName("value") | ||
private int value; | ||
@SerializedName("detail") | ||
private String detail; | ||
|
||
public IdnDeaths(int value, String detail) { | ||
this.value = value; | ||
this.detail = detail; | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(int value) { | ||
this.value = value; | ||
} | ||
|
||
public String getDetail() { | ||
return detail; | ||
} | ||
|
||
public void setDetail(String detail) { | ||
this.detail = detail; | ||
} | ||
} | ||
|
||
public class IdnRecovered { | ||
@SerializedName("value") | ||
private int value; | ||
@SerializedName("detail") | ||
private String detail; | ||
|
||
public IdnRecovered(int value, String detail) { | ||
this.value = value; | ||
this.detail = detail; | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(int value) { | ||
this.value = value; | ||
} | ||
|
||
public String getDetail() { | ||
return detail; | ||
} | ||
|
||
public void setDetail(String detail) { | ||
this.detail = detail; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.