mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Debug prefsManager usage
This commit is contained in:
parent
d2dce12c22
commit
602374522e
1 changed files with 12 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
package net.foucry.pilldroid;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -13,6 +14,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
|
@ -28,13 +30,18 @@ public class WelcomeActivity extends AppCompatActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Boolean DEBUG = false;
|
||||
|
||||
// Checking for first time launch - before calling setContentView()
|
||||
prefManager = new PrefManager(this);
|
||||
if (DEBUG) {
|
||||
prefManager.setFirstTimeLaunch(true);
|
||||
}
|
||||
if (!prefManager.isFirstTimeLaunch()) {
|
||||
launchHomeScreen();
|
||||
finish();
|
||||
}
|
||||
|
||||
prefManager.setFirstTimeLaunch(false);
|
||||
// Making notification bar transparent
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
|
||||
|
@ -98,20 +105,20 @@ public class WelcomeActivity extends AppCompatActivity {
|
|||
private void addBottomDots(int currentPage) {
|
||||
TextView[] dots = new TextView[layouts.length];
|
||||
|
||||
int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);
|
||||
int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);
|
||||
//int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);
|
||||
//int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);
|
||||
|
||||
dotsLayout.removeAllViews();
|
||||
for (int i = 0; i < dots.length; i++) {
|
||||
dots[i] = new TextView(this);
|
||||
dots[i].setText("∙");
|
||||
dots[i].setTextSize(35);
|
||||
dots[i].setTextColor(colorsInactive[currentPage]);
|
||||
dots[i].setTextColor(ContextCompat.getColor(this, R.color.dot_dark));
|
||||
dotsLayout.addView(dots[i]);
|
||||
}
|
||||
|
||||
if (dots.length > 0)
|
||||
dots[currentPage].setTextColor(colorsActive[currentPage]);
|
||||
dots[currentPage].setTextColor(ContextCompat.getColor(this, R.color.dot_light));
|
||||
}
|
||||
|
||||
private int getItem(int i) {
|
||||
|
|
Loading…
Reference in a new issue