// Path: app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/helpers/PrefManager.java
// public class PrefManager {
//     public static final String PREF_SAVE_REAL_IMAGE_TO_HISTORY = "pref_save_real_image_to_history";
// 
//     private final SharedPreferences pref;
//     private final SharedPreferences.Editor editor;
// 
//     // shared pref mode
//     private final int PRIVATE_MODE = 0;
// 
//     // Shared preferences file name
//     private static final String PREF_NAME = "privacy_friendly_apps";
// 
//     private static final String IS_FIRST_TIME_LAUNCH = "IsFirstTimeLaunch";
// 
//     public PrefManager(Context context) {
//         pref = context.getSharedPreferences(PREF_NAME, PRIVATE_MODE);
//         editor = pref.edit();
//     }
// 
//     public void setFirstTimeLaunch(boolean isFirstTime) {
//         editor.putBoolean(IS_FIRST_TIME_LAUNCH, isFirstTime);
//         editor.commit();
//     }
// 
//     public boolean isFirstTimeLaunch() {
//         return pref.getBoolean(IS_FIRST_TIME_LAUNCH, true);
//     }
// 
// }


import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.secuso.privacyfriendlycodescanner.qrscanner.R;
import com.secuso.privacyfriendlycodescanner.qrscanner.helpers.PrefManager;
/*
 This file is part of Privacy Friendly App Example.

 Privacy Friendly App Example is free software:
 you can redistribute it and/or modify it under the terms of the
 GNU General Public License as published by the Free Software Foundation,
 either version 3 of the License, or any later version.

 Privacy Friendly App Example is distributed in the hope
 that it will be useful, but WITHOUT ANY WARRANTY; without even
 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 See the GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Privacy Friendly App Example. If not, see <http://www.gnu.org/licenses/>.
 */

package com.secuso.privacyfriendlycodescanner.qrscanner.ui.activities;





/**
 * Class structure taken from tutorial at http://www.androidhive.info/2016/05/android-build-intro-slider-app/
 *
 * @author Karola Marky
 * @version 20161214
 */

public class TutorialActivity extends AppCompatActivity {

    private ViewPager viewPager;
    private MyViewPagerAdapter myViewPagerAdapter;
    private LinearLayout dotsLayout;
    private TextView[] dots;
    private int[] layouts;
    private Button btnSkip, btnNext;
    private PrefManager prefManager;

    private static final String TAG = TutorialActivity.class.getSimpleName();
    public static final String ACTION_SHOW_ANYWAYS = TAG + ".ACTION_SHOW_ANYWAYS";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Checking for first time launch - before calling setContentView()
// Path: app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/helpers/PrefManager.java
// public class PrefManager {
//     public static final String PREF_SAVE_REAL_IMAGE_TO_HISTORY = "pref_save_real_image_to_history";
// 
//     private final SharedPreferences pref;
//     private final SharedPreferences.Editor editor;
// 
//     // shared pref mode
//     private final int PRIVATE_MODE = 0;
// 
//     // Shared preferences file name
//     private static final String PREF_NAME = "privacy_friendly_apps";
// 
//     private static final String IS_FIRST_TIME_LAUNCH = "IsFirstTimeLaunch";
// 
//     public PrefManager(Context context) {
//         pref = context.getSharedPreferences(PREF_NAME, PRIVATE_MODE);
//         editor = pref.edit();
//     }
// 
//     public void setFirstTimeLaunch(boolean isFirstTime) {
//         editor.putBoolean(IS_FIRST_TIME_LAUNCH, isFirstTime);
//         editor.commit();
//     }
// 
//     public boolean isFirstTimeLaunch() {
//         return pref.getBoolean(IS_FIRST_TIME_LAUNCH, true);
//     }
// 
// }


// Path: app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/activities/TutorialActivity.java
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.secuso.privacyfriendlycodescanner.qrscanner.R;
import com.secuso.privacyfriendlycodescanner.qrscanner.helpers.PrefManager;

/*
 This file is part of Privacy Friendly App Example.

 Privacy Friendly App Example is free software:
 you can redistribute it and/or modify it under the terms of the
 GNU General Public License as published by the Free Software Foundation,
 either version 3 of the License, or any later version.

 Privacy Friendly App Example is distributed in the hope
 that it will be useful, but WITHOUT ANY WARRANTY; without even
 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 See the GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Privacy Friendly App Example. If not, see <http://www.gnu.org/licenses/>.
 */

package com.secuso.privacyfriendlycodescanner.qrscanner.ui.activities;





/**
 * Class structure taken from tutorial at http://www.androidhive.info/2016/05/android-build-intro-slider-app/
 *
 * @author Karola Marky
 * @version 20161214
 */

public class TutorialActivity extends AppCompatActivity {

    private ViewPager viewPager;
    private MyViewPagerAdapter myViewPagerAdapter;
    private LinearLayout dotsLayout;
    private TextView[] dots;
    private int[] layouts;
    private Button btnSkip, btnNext;
    private PrefManager prefManager;

    private static final String TAG = TutorialActivity.class.getSimpleName();
    public static final String ACTION_SHOW_ANYWAYS = TAG + ".ACTION_SHOW_ANYWAYS";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Checking for first time launch - before calling setContentView()
        prefManager = new PrefManager(this);