package com.chromium.fontinstaller;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageButton;
import android.widget.TextView;

public class Splash extends Activity {

	ImageButton continueToApp, help;
	TextView prompt;
	
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.splash);
	    
	    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
	    	Window win = getWindow();
	    	win.setFlags (WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
	    	win.setFlags (WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
	    }
	    
	    continueToApp = (ImageButton)findViewById(R.id.icon);
	    continueToApp.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v){
				continueToApp.setColorFilter(Color.argb(50, 255, 255, 255)); // White Tint
				Intent main = new Intent (Splash.this, MainActivity.class);
				startActivity (main);
				finish();
			}
		});
	    
	    help = (ImageButton)findViewById(R.id.help);
	    help.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v){
				help.setColorFilter(Color.argb(50, 255, 255, 255)); // White Tint
				
				CustomAlerts.showSingleButtonAlert ("Welcome!", "It is strongly suggested that you backup your current fonts using " +
						"the backup option found in this app prior to installing any custom ones.\n\nFor further safety, " +
						"a recovery flashable zip of the stock fonts has been placed in your downloads folder. In the " +
						"unlikely, but possible event that you encounter issues, please flash this zip.\n", Splash.this);
			}
		});
	    
	    prompt = (TextView)findViewById(R.id.textView1);   
	    Typeface ProximaNovaLight = Typeface.createFromAsset(getAssets(),"fonts/ProximaNovaLight.ttf");
	    prompt.setTypeface(ProximaNovaLight);
	}

}

@@ -1,8 +1,612 @@
+/*%0A * Copyright (C) 2014 Priyesh Patel%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A %0A
 package 

Add license header8