@@ -12,7 +12,7 @@ | |||||
android:usesCleartextTraffic="true" | android:usesCleartextTraffic="true" | ||||
android:theme="@style/Theme.Nsgk_rural_web"> | android:theme="@style/Theme.Nsgk_rural_web"> | ||||
<activity | <activity | ||||
android:name=".FullscreenActivity" | |||||
android:name=".WelcomeActivity" | |||||
android:configChanges="orientation|keyboardHidden|screenSize" | android:configChanges="orientation|keyboardHidden|screenSize" | ||||
android:label="@string/app_name" | android:label="@string/app_name" | ||||
android:theme="@style/Theme.Nsgk_rural_web.Fullscreen"> | android:theme="@style/Theme.Nsgk_rural_web.Fullscreen"> | ||||
@@ -22,6 +22,9 @@ | |||||
<category android:name="android.intent.category.LAUNCHER" /> | <category android:name="android.intent.category.LAUNCHER" /> | ||||
</intent-filter> | </intent-filter> | ||||
</activity> | </activity> | ||||
<activity | |||||
android:name=".FullscreenActivity" | |||||
android:configChanges="orientation|keyboardHidden|screenSize" /> | |||||
</application> | </application> | ||||
</manifest> | </manifest> |
@@ -0,0 +1,12 @@ | |||||
package com.nsgk.ruralWeb; | |||||
import android.app.Application; | |||||
import java.util.concurrent.ExecutorService; | |||||
import java.util.concurrent.Executors; | |||||
public class MyApplication extends Application { | |||||
ExecutorService executorService = Executors.newFixedThreadPool(4); | |||||
} |
@@ -0,0 +1,43 @@ | |||||
package com.nsgk.ruralWeb; | |||||
import android.annotation.SuppressLint; | |||||
import android.content.Intent; | |||||
import android.os.Bundle; | |||||
import android.os.Handler; | |||||
import android.os.Message; | |||||
import androidx.annotation.NonNull; | |||||
import androidx.appcompat.app.AppCompatActivity; | |||||
public class WelcomeActivity extends AppCompatActivity { | |||||
private Handler handler = new Handler() { | |||||
@SuppressLint("HandlerLeak") | |||||
@Override | |||||
public void handleMessage(@NonNull Message msg) { | |||||
switch (msg.what) { | |||||
case 1: | |||||
finish(); | |||||
Intent intent = new Intent(WelcomeActivity.this, FullscreenActivity.class); | |||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||||
startActivity(intent); | |||||
break; | |||||
} | |||||
} | |||||
}; | |||||
@Override | |||||
protected void onCreate(Bundle savedInstanceState) { | |||||
super.onCreate(savedInstanceState); | |||||
this.setContentView(R.layout.activity_welcome); | |||||
handler.postDelayed(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
handler.sendEmptyMessage(1); | |||||
} | |||||
}, 3000); | |||||
} | |||||
} |
@@ -0,0 +1,9 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:orientation="vertical" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/white" | |||||
android:theme="@style/ThemeOverlay.Nsgk_rural_web.FullscreenContainer"> | |||||
</LinearLayout> |