Skip to content

Commit 8b38839

Browse files
author
GauthamAsir
committed
Check for update in onCreate
Check for app update when Activity is created. Change Update Dialog Theme. Signed-off-by: GauthamAsir <gauthamasir@gmail.com>
1 parent 5a75a63 commit 8b38839

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/src/main/java/a/gautham/statusdownloader/MainActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ protected void onCreate(Bundle savedInstanceState) {
4949
super.onCreate(savedInstanceState);
5050
setContentView(R.layout.activity_main);
5151

52+
GetLatestAppVersion getLatestAppVersion = new GetLatestAppVersion();
53+
getLatestAppVersion.execute();
54+
5255
MaterialToolbar toolbar = findViewById(R.id.toolbarMainActivity);
5356
TabLayout tabLayout = findViewById(R.id.tabLayout);
5457
viewPager = findViewById(R.id.viewPager);
@@ -186,6 +189,7 @@ protected Object doInBackground(Object[] objects) {
186189

187190
AppUpdater appUpdater = new AppUpdater(MainActivity.this);
188191
appUpdater.setDisplay(Display.DIALOG);
192+
appUpdater.setDialogAlertStyle(R.style.dialogAlertStyle);
189193
appUpdater.setUpGithub("GauthamAsir", "WhatsApp_Status_Saver");
190194
appUpdater.start();
191195

app/src/main/res/values/styles.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@
1717
<item name="android:windowExitAnimation">@android:anim/slide_out_right</item>
1818
</style>
1919

20+
<style name="dialogAlertStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
21+
<item name="android:windowBackground">@color/white</item>
22+
</style>
23+
2024
</resources>

0 commit comments

Comments
 (0)