// Path: app/src/main/java/com/totsp/crossword/versions/AndroidVersionUtils.java
// public interface AndroidVersionUtils {
// 	
// 	void storeMetas(Uri uri, PuzzleMeta meta);
// 
// 	void setContext(Context ctx);
// 
// 	boolean downloadFile(URL url, File destination,
// 						 Map<String, String> headers, boolean notification, String title);
// 
// 	void finishOnHomeButton(AppCompatActivity a);
// 
// 	void holographic(AppCompatActivity playActivity);
// 
// 	void onActionBarWithText(MenuItem a);
// 
// 	void onActionBarWithText(SubMenu reveal);
// 
// 	void restoreNightMode(ShortyzActivity shortyzActivity);
// 
// 	class Factory {
// 		private static AndroidVersionUtils INSTANCE;
// 		
// 		public static AndroidVersionUtils getInstance() {
// 			if(INSTANCE != null){
// 				return INSTANCE;
// 			}
// 			System.out.println("Creating utils for version: "
// 					+ android.os.Build.VERSION.SDK_INT);
// 			if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// 				System.out.println("Using Oreo");
// 				return INSTANCE = new OreoUtil();
// 			}
// 			else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// 				System.out.println("Using Lollipop");
// 				return INSTANCE = new LollipopUtil();
// 			}
// 			else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// 				System.out.println("Using Honeycomb");
// 				return INSTANCE = new HoneycombUtil();
// 			} else {
// 				System.out.println("Using Gingerbread");
// 				return INSTANCE = new GingerbreadUtil();
// 			}
// 		}
// 	}
// 
// 	View onActionBarCustom(AppCompatActivity a, int id);
// 	
// 	void hideWindowTitle(AppCompatActivity a);
// 	
// 	void hideActionBar(AppCompatActivity a);
// 
//     void onActionBarWithoutText(MenuItem a);
// 
//     void hideTitleOnPortrait(AppCompatActivity a);
// 
// 	void toggleNightMode(ShortyzActivity activity);
// 
// 	boolean isNightModeAvailable();
// 
// 	// This has a dependency on JobScheduler which is only available in SDK version 21.
// 	//
// 	// TODO: It might be possible to replicate this functionality on older versions using
// 	// AlarmManager.
// 	boolean isBackgroundDownloadAvaliable();
// 
// 	// Checks whether a background download may have updated the available puzzles, requiring a
// 	// UI refresh.
// 	boolean checkBackgroundDownload(SharedPreferences prefs, boolean hasWritePermissions);
// 
// 	void clearBackgroundDownload(SharedPreferences prefs);
// 
// 	void createNotificationChannel(Context context);
// }
// 
// Path: app/src/main/java/com/totsp/crossword/view/recycler/ShowHideOnScroll.java
// public class ShowHideOnScroll extends ScrollDetector implements Animation.AnimationListener {
//     private final View view;
//     private final int showAnimationId;
//     private final int hideAnimationId;
// 
//     public ShowHideOnScroll(View view) {
//         this(view, R.anim.float_show, R.anim.float_hide);
//     }
// 
//     public ShowHideOnScroll(View view, int animShow, int animHide) {
//         super(view.getContext());
//         this.view = view;
//         this.showAnimationId = animShow;
//         this.hideAnimationId = animHide;
//     }
// 
//     public void onScrollDown() {
//         if(this.view.getVisibility() != View.VISIBLE) {
//             this.view.setVisibility(View.VISIBLE);
//             this.animate(this.showAnimationId);
//         }
// 
//     }
// 
//     public void onScrollUp() {
//         if(this.view.getVisibility() == View.VISIBLE) {
//             this.view.setVisibility(View.GONE);
//             this.animate(this.hideAnimationId);
//         }
// 
//     }
// 
//     private void animate(int anim) {
//         if(anim != 0) {
//             Animation a = AnimationUtils.loadAnimation(this.view.getContext(), anim);
//             a.setAnimationListener(this);
//             this.view.startAnimation(a);
//             this.setIgnore(true);
//         }
// 
//     }
// 
//     public void onAnimationStart(Animation animation) {
//     }
// 
//     public void onAnimationEnd(Animation animation) {
//         this.setIgnore(false);
//     }
// 
//     public void onAnimationRepeat(Animation animation) {
//     }
// }


import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import androidx.appcompat.app.ActionBar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.totsp.crossword.shortyz.R;
import com.totsp.crossword.versions.AndroidVersionUtils;
import com.totsp.crossword.view.recycler.ShowHideOnScroll;

package com.totsp.crossword;





public class HTMLActivity extends ShortyzActivity {
	protected AndroidVersionUtils utils = AndroidVersionUtils.Factory.getInstance();
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        utils.holographic(this);
        utils.finishOnHomeButton(this);
        this.setContentView(R.layout.html_view);
        ActionBar actionBar = getSupportActionBar();
        actionBar.hide();
        WebView webview = (WebView) this.findViewById(R.id.webkit);
        Uri u = this.getIntent()
                    .getData();
        webview.loadUrl(u.toString());
        FloatingActionButton download = (FloatingActionButton) this.findViewById(R.id.button_floating_action);
        if(download != null) {
            download.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    finish();
                }
            });
            download.setImageBitmap(createBitmap("icons1.ttf", "k"));

// Path: app/src/main/java/com/totsp/crossword/versions/AndroidVersionUtils.java
// public interface AndroidVersionUtils {
// 	
// 	void storeMetas(Uri uri, PuzzleMeta meta);
// 
// 	void setContext(Context ctx);
// 
// 	boolean downloadFile(URL url, File destination,
// 						 Map<String, String> headers, boolean notification, String title);
// 
// 	void finishOnHomeButton(AppCompatActivity a);
// 
// 	void holographic(AppCompatActivity playActivity);
// 
// 	void onActionBarWithText(MenuItem a);
// 
// 	void onActionBarWithText(SubMenu reveal);
// 
// 	void restoreNightMode(ShortyzActivity shortyzActivity);
// 
// 	class Factory {
// 		private static AndroidVersionUtils INSTANCE;
// 		
// 		public static AndroidVersionUtils getInstance() {
// 			if(INSTANCE != null){
// 				return INSTANCE;
// 			}
// 			System.out.println("Creating utils for version: "
// 					+ android.os.Build.VERSION.SDK_INT);
// 			if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// 				System.out.println("Using Oreo");
// 				return INSTANCE = new OreoUtil();
// 			}
// 			else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// 				System.out.println("Using Lollipop");
// 				return INSTANCE = new LollipopUtil();
// 			}
// 			else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// 				System.out.println("Using Honeycomb");
// 				return INSTANCE = new HoneycombUtil();
// 			} else {
// 				System.out.println("Using Gingerbread");
// 				return INSTANCE = new GingerbreadUtil();
// 			}
// 		}
// 	}
// 
// 	View onActionBarCustom(AppCompatActivity a, int id);
// 	
// 	void hideWindowTitle(AppCompatActivity a);
// 	
// 	void hideActionBar(AppCompatActivity a);
// 
//     void onActionBarWithoutText(MenuItem a);
// 
//     void hideTitleOnPortrait(AppCompatActivity a);
// 
// 	void toggleNightMode(ShortyzActivity activity);
// 
// 	boolean isNightModeAvailable();
// 
// 	// This has a dependency on JobScheduler which is only available in SDK version 21.
// 	//
// 	// TODO: It might be possible to replicate this functionality on older versions using
// 	// AlarmManager.
// 	boolean isBackgroundDownloadAvaliable();
// 
// 	// Checks whether a background download may have updated the available puzzles, requiring a
// 	// UI refresh.
// 	boolean checkBackgroundDownload(SharedPreferences prefs, boolean hasWritePermissions);
// 
// 	void clearBackgroundDownload(SharedPreferences prefs);
// 
// 	void createNotificationChannel(Context context);
// }
// 
// Path: app/src/main/java/com/totsp/crossword/view/recycler/ShowHideOnScroll.java
// public class ShowHideOnScroll extends ScrollDetector implements Animation.AnimationListener {
//     private final View view;
//     private final int showAnimationId;
//     private final int hideAnimationId;
// 
//     public ShowHideOnScroll(View view) {
//         this(view, R.anim.float_show, R.anim.float_hide);
//     }
// 
//     public ShowHideOnScroll(View view, int animShow, int animHide) {
//         super(view.getContext());
//         this.view = view;
//         this.showAnimationId = animShow;
//         this.hideAnimationId = animHide;
//     }
// 
//     public void onScrollDown() {
//         if(this.view.getVisibility() != View.VISIBLE) {
//             this.view.setVisibility(View.VISIBLE);
//             this.animate(this.showAnimationId);
//         }
// 
//     }
// 
//     public void onScrollUp() {
//         if(this.view.getVisibility() == View.VISIBLE) {
//             this.view.setVisibility(View.GONE);
//             this.animate(this.hideAnimationId);
//         }
// 
//     }
// 
//     private void animate(int anim) {
//         if(anim != 0) {
//             Animation a = AnimationUtils.loadAnimation(this.view.getContext(), anim);
//             a.setAnimationListener(this);
//             this.view.startAnimation(a);
//             this.setIgnore(true);
//         }
// 
//     }
// 
//     public void onAnimationStart(Animation animation) {
//     }
// 
//     public void onAnimationEnd(Animation animation) {
//         this.setIgnore(false);
//     }
// 
//     public void onAnimationRepeat(Animation animation) {
//     }
// }


// Path: app/src/main/java/com/totsp/crossword/HTMLActivity.java
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import androidx.appcompat.app.ActionBar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.totsp.crossword.shortyz.R;
import com.totsp.crossword.versions.AndroidVersionUtils;
import com.totsp.crossword.view.recycler.ShowHideOnScroll;

package com.totsp.crossword;





public class HTMLActivity extends ShortyzActivity {
	protected AndroidVersionUtils utils = AndroidVersionUtils.Factory.getInstance();
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        utils.holographic(this);
        utils.finishOnHomeButton(this);
        this.setContentView(R.layout.html_view);
        ActionBar actionBar = getSupportActionBar();
        actionBar.hide();
        WebView webview = (WebView) this.findViewById(R.id.webkit);
        Uri u = this.getIntent()
                    .getData();
        webview.loadUrl(u.toString());
        FloatingActionButton download = (FloatingActionButton) this.findViewById(R.id.button_floating_action);
        if(download != null) {
            download.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    finish();
                }
            });
            download.setImageBitmap(createBitmap("icons1.ttf", "k"));

            webview.setOnTouchListener(new ShowHideOnScroll(download));
