// Path: app/src/main/java/com/icecream/snorlax/app/SnorlaxApp.java
// public class SnorlaxApp extends Application {
// 
// 	public static boolean isEnabled() {
// 		return false;
// 	}
// 
// 	@Override
// 	public void onCreate() {
// 		super.onCreate();
// 
// 		if (BuildConfig.DEBUG) {
// 			Timber.plant(new Timber.DebugTree());
// 		}
// 	}
// }
// 
// Path: app/src/main/java/com/icecream/snorlax/app/settings/SettingsFragment.java
// @SuppressWarnings({"unused", "FieldCanBeLocal", "WeakerAccess"})
// public class SettingsFragment extends PreferenceFragmentCompat {
// 
// 	private SettingsReadable mSettingsReadable;
// 
// 	@Override
// 	public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
// 		addPreferencesFromResource(preferences);
// 	}
// 
// 	@Override
// 	public void onActivityCreated(Bundle savedInstanceState) {
// 		super.onActivityCreated(savedInstanceState);
// 
// 		setDivider(new ColorDrawable(Color.TRANSPARENT));
// 		setDividerHeight(0);
// 
// 		getListView().setPadding(0, 0, 0, getActivity().getResources().getDimensionPixelSize(R.dimen.padding_list_bottom));
// 	}
// 
// 	@Override
// 	public void onPause() {
// 		super.onPause();
// 		SettingsReadable settingsReadable = new SettingsReadable(
// 			getActivity().getApplicationInfo(),
// 			getPreferenceManager()
// 		);
// 
// 		settingsReadable
// 			.setReadable()
// 			.subscribe(Timber::d, throwable -> {
// 				Timber.e(throwable);
// 				showReadableError();
// 			});
// 	}
// 
// 	private void showReadableError() {
// 		if (getActivity() != null) {
// 			Toast.makeText(getActivity(), R.string.error_readable, Toast.LENGTH_LONG).show();
// 		}
// 	}
// }


import java.util.concurrent.TimeUnit;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import com.icecream.snorlax.BuildConfig;
import com.icecream.snorlax.R;
import com.icecream.snorlax.app.SnorlaxApp;
import com.icecream.snorlax.app.settings.SettingsFragment;
import com.jakewharton.rxbinding.view.RxView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import rx.Observable;
import static com.icecream.snorlax.R.xml.preferences;
/*
 * Copyright (c) 2016. Pedro Diaz <igoticecream@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.icecream.snorlax.app.home;






public class HomeActivity extends AppCompatActivity {

	@BindView(R.id.coordinator)
	CoordinatorLayout mCoordinatorLayout;
	@BindView(R.id.toolbar)
	Toolbar mToolbar;
	@BindView(R.id.fab)
	FloatingActionButton mFab;

	private Unbinder mUnbinder;
	private AlertDialog mAboutDialog;
	private AlertDialog mFormatInfoDialog;
	private AlertDialog mDonationDialog;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.home_activity);
		mUnbinder = ButterKnife.bind(this);

		setupToolbar();
		setupPreferences();

		if (savedInstanceState == null) {
			Observable
// Path: app/src/main/java/com/icecream/snorlax/app/SnorlaxApp.java
// public class SnorlaxApp extends Application {
// 
// 	public static boolean isEnabled() {
// 		return false;
// 	}
// 
// 	@Override
// 	public void onCreate() {
// 		super.onCreate();
// 
// 		if (BuildConfig.DEBUG) {
// 			Timber.plant(new Timber.DebugTree());
// 		}
// 	}
// }
// 
// Path: app/src/main/java/com/icecream/snorlax/app/settings/SettingsFragment.java
// @SuppressWarnings({"unused", "FieldCanBeLocal", "WeakerAccess"})
// public class SettingsFragment extends PreferenceFragmentCompat {
// 
// 	private SettingsReadable mSettingsReadable;
// 
// 	@Override
// 	public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
// 		addPreferencesFromResource(preferences);
// 	}
// 
// 	@Override
// 	public void onActivityCreated(Bundle savedInstanceState) {
// 		super.onActivityCreated(savedInstanceState);
// 
// 		setDivider(new ColorDrawable(Color.TRANSPARENT));
// 		setDividerHeight(0);
// 
// 		getListView().setPadding(0, 0, 0, getActivity().getResources().getDimensionPixelSize(R.dimen.padding_list_bottom));
// 	}
// 
// 	@Override
// 	public void onPause() {
// 		super.onPause();
// 		SettingsReadable settingsReadable = new SettingsReadable(
// 			getActivity().getApplicationInfo(),
// 			getPreferenceManager()
// 		);
// 
// 		settingsReadable
// 			.setReadable()
// 			.subscribe(Timber::d, throwable -> {
// 				Timber.e(throwable);
// 				showReadableError();
// 			});
// 	}
// 
// 	private void showReadableError() {
// 		if (getActivity() != null) {
// 			Toast.makeText(getActivity(), R.string.error_readable, Toast.LENGTH_LONG).show();
// 		}
// 	}
// }


// Path: app/src/main/java/com/icecream/snorlax/app/home/HomeActivity.java
import java.util.concurrent.TimeUnit;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import com.icecream.snorlax.BuildConfig;
import com.icecream.snorlax.R;
import com.icecream.snorlax.app.SnorlaxApp;
import com.icecream.snorlax.app.settings.SettingsFragment;
import com.jakewharton.rxbinding.view.RxView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import rx.Observable;
import static com.icecream.snorlax.R.xml.preferences;

/*
 * Copyright (c) 2016. Pedro Diaz <igoticecream@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.icecream.snorlax.app.home;






public class HomeActivity extends AppCompatActivity {

	@BindView(R.id.coordinator)
	CoordinatorLayout mCoordinatorLayout;
	@BindView(R.id.toolbar)
	Toolbar mToolbar;
	@BindView(R.id.fab)
	FloatingActionButton mFab;

	private Unbinder mUnbinder;
	private AlertDialog mAboutDialog;
	private AlertDialog mFormatInfoDialog;
	private AlertDialog mDonationDialog;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.home_activity);
		mUnbinder = ButterKnife.bind(this);

		setupToolbar();
		setupPreferences();

		if (savedInstanceState == null) {
			Observable
				.just(SnorlaxApp.isEnabled())