From 112bc82339923a0472203376415328c9fa029ce5 Mon Sep 17 00:00:00 2001 From: Jannik Date: Mon, 30 May 2016 14:12:02 +0200 Subject: [PATCH] Project commit Including countdowntimer, settings. TODO the break menu isn't working. FInd a way to create a new working concept --- .gitignore | 8 + .idea/.name | 1 + .idea/compiler.xml | 22 ++ .idea/copyright/profiles_settings.xml | 3 + .idea/encodings.xml | 6 + .idea/gradle.xml | 24 ++ .idea/misc.xml | 46 +++ .idea/modules.xml | 9 + .idea/runConfigurations.xml | 12 + app/.gitignore | 1 + app/build.gradle | 29 ++ app/proguard-rules.pro | 17 ++ .../ApplicationTest.java | 13 + app/src/main/AndroidManifest.xml | 41 +++ .../AppCompatPreferenceActivity.java | 109 +++++++ .../BreakActivity.java | 245 ++++++++++++++++ .../BreakDecider.java | 34 +++ .../BreakReminder.java | 218 ++++++++++++++ .../SeekBarPreference.java | 169 +++++++++++ .../SettingsActivity.java | 269 ++++++++++++++++++ .../res/drawable-hdpi/ic_info_black_24dp.png | Bin 0 -> 321 bytes .../ic_notifications_black_24dp.png | Bin 0 -> 233 bytes .../res/drawable-hdpi/ic_sync_black_24dp.png | Bin 0 -> 368 bytes .../res/drawable-mdpi/ic_info_black_24dp.png | Bin 0 -> 222 bytes .../ic_notifications_black_24dp.png | Bin 0 -> 182 bytes .../res/drawable-mdpi/ic_sync_black_24dp.png | Bin 0 -> 250 bytes .../res/drawable-v21/ic_info_black_24dp.xml | 9 + .../main/res/drawable-v21/ic_menu_manage.xml | 9 + .../ic_notifications_black_24dp.xml | 9 + .../res/drawable-v21/ic_sync_black_24dp.xml | 9 + .../res/drawable-xhdpi/ic_info_black_24dp.png | Bin 0 -> 412 bytes .../ic_notifications_black_24dp.png | Bin 0 -> 278 bytes .../res/drawable-xhdpi/ic_sync_black_24dp.png | Bin 0 -> 467 bytes .../drawable-xxhdpi/ic_info_black_24dp.png | Bin 0 -> 579 bytes .../ic_notifications_black_24dp.png | Bin 0 -> 383 bytes .../drawable-xxhdpi/ic_sync_black_24dp.png | Bin 0 -> 669 bytes .../drawable-xxxhdpi/ic_info_black_24dp.png | Bin 0 -> 766 bytes .../ic_notifications_black_24dp.png | Bin 0 -> 497 bytes .../drawable-xxxhdpi/ic_sync_black_24dp.png | Bin 0 -> 875 bytes app/src/main/res/drawable/side_nav_bar.xml | 9 + app/src/main/res/drawable/statistic_logo.png | Bin 0 -> 18528 bytes app/src/main/res/layout/activity_break.xml | 36 +++ .../res/layout/activity_break_decider.xml | 43 +++ .../res/layout/activity_break_reminder.xml | 26 ++ .../res/layout/app_bar_break_reminder.xml | 27 ++ .../res/layout/content_break_reminder.xml | 65 +++++ app/src/main/res/layout/fragment_break.xml | 41 +++ .../res/layout/nav_header_break_reminder.xml | 22 ++ .../menu/activity_break_reminder_drawer.xml | 29 ++ app/src/main/res/menu/break_reminder.xml | 9 + app/src/main/res/menu/menu_break.xml | 10 + app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3418 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2206 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4842 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7718 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10486 bytes app/src/main/res/values-v21/styles.xml | 9 + app/src/main/res/values-w820dp/dimens.xml | 6 + app/src/main/res/values/colors.xml | 6 + app/src/main/res/values/dimens.xml | 10 + app/src/main/res/values/drawables.xml | 3 + app/src/main/res/values/strings.xml | 43 +++ app/src/main/res/values/styles.xml | 20 ++ app/src/main/res/xml/pref_general.xml | 35 +++ app/src/main/res/xml/pref_headers.xml | 17 ++ app/src/main/res/xml/pref_notification.xml | 27 ++ .../ExampleUnitTest.java | 15 + build.gradle | 23 ++ gradle.properties | 18 ++ gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 160 +++++++++++ gradlew.bat | 90 ++++++ settings.gradle | 1 + 74 files changed, 2118 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.name create mode 100644 .idea/compiler.xml create mode 100644 .idea/copyright/profiles_settings.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/gradle.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 app/.gitignore create mode 100644 app/build.gradle create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/ApplicationTest.java create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/AppCompatPreferenceActivity.java create mode 100644 app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakActivity.java create mode 100644 app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakDecider.java create mode 100644 app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakReminder.java create mode 100644 app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SeekBarPreference.java create mode 100644 app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SettingsActivity.java create mode 100644 app/src/main/res/drawable-hdpi/ic_info_black_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png create mode 100644 app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_info_black_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_sync_black_24dp.png create mode 100644 app/src/main/res/drawable-v21/ic_info_black_24dp.xml create mode 100644 app/src/main/res/drawable-v21/ic_menu_manage.xml create mode 100644 app/src/main/res/drawable-v21/ic_notifications_black_24dp.xml create mode 100644 app/src/main/res/drawable-v21/ic_sync_black_24dp.xml create mode 100644 app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png create mode 100644 app/src/main/res/drawable/side_nav_bar.xml create mode 100644 app/src/main/res/drawable/statistic_logo.png create mode 100644 app/src/main/res/layout/activity_break.xml create mode 100644 app/src/main/res/layout/activity_break_decider.xml create mode 100644 app/src/main/res/layout/activity_break_reminder.xml create mode 100644 app/src/main/res/layout/app_bar_break_reminder.xml create mode 100644 app/src/main/res/layout/content_break_reminder.xml create mode 100644 app/src/main/res/layout/fragment_break.xml create mode 100644 app/src/main/res/layout/nav_header_break_reminder.xml create mode 100644 app/src/main/res/menu/activity_break_reminder_drawer.xml create mode 100644 app/src/main/res/menu/break_reminder.xml create mode 100644 app/src/main/res/menu/menu_break.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 app/src/main/res/values-v21/styles.xml create mode 100644 app/src/main/res/values-w820dp/dimens.xml create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/dimens.xml create mode 100644 app/src/main/res/values/drawables.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/styles.xml create mode 100644 app/src/main/res/xml/pref_general.xml create mode 100644 app/src/main/res/xml/pref_headers.xml create mode 100644 app/src/main/res/xml/pref_notification.xml create mode 100644 app/src/test/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/ExampleUnitTest.java create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6cbe56 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..2371e82 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Privacy Friendly Break Reminder \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..ee6ddd0 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..5d19981 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..162eb5d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..02a4b1a --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,29 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.3" + + defaultConfig { + applicationId "orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder" + minSdkVersion 15 + targetSdkVersion 23 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(include: ['*.jar'], dir: 'libs') + testCompile 'junit:junit:4.12' + compile 'com.android.support:appcompat-v7:23.4.0' + compile 'com.android.support:design:23.4.0' + compile 'com.android.support:support-v4:23.4.0' + compile 'com.android.support:support-annotations:23.4.0' +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..875deba --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Users\badri_000\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/app/src/androidTest/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/ApplicationTest.java b/app/src/androidTest/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/ApplicationTest.java new file mode 100644 index 0000000..043f8f7 --- /dev/null +++ b/app/src/androidTest/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/ApplicationTest.java @@ -0,0 +1,13 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..1d87e8b --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/AppCompatPreferenceActivity.java b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/AppCompatPreferenceActivity.java new file mode 100644 index 0000000..d93609f --- /dev/null +++ b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/AppCompatPreferenceActivity.java @@ -0,0 +1,109 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + +import android.content.res.Configuration; +import android.os.Bundle; +import android.preference.PreferenceActivity; +import android.support.annotation.LayoutRes; +import android.support.annotation.Nullable; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatDelegate; +import android.support.v7.widget.Toolbar; +import android.view.MenuInflater; +import android.view.View; +import android.view.ViewGroup; + +/** + * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls + * to be used with AppCompat. + */ +public abstract class AppCompatPreferenceActivity extends PreferenceActivity { + + private AppCompatDelegate mDelegate; + + @Override + protected void onCreate(Bundle savedInstanceState) { + getDelegate().installViewFactory(); + getDelegate().onCreate(savedInstanceState); + super.onCreate(savedInstanceState); + } + + @Override + protected void onPostCreate(Bundle savedInstanceState) { + super.onPostCreate(savedInstanceState); + getDelegate().onPostCreate(savedInstanceState); + } + + public ActionBar getSupportActionBar() { + return getDelegate().getSupportActionBar(); + } + + public void setSupportActionBar(@Nullable Toolbar toolbar) { + getDelegate().setSupportActionBar(toolbar); + } + + @Override + public MenuInflater getMenuInflater() { + return getDelegate().getMenuInflater(); + } + + @Override + public void setContentView(@LayoutRes int layoutResID) { + getDelegate().setContentView(layoutResID); + } + + @Override + public void setContentView(View view) { + getDelegate().setContentView(view); + } + + @Override + public void setContentView(View view, ViewGroup.LayoutParams params) { + getDelegate().setContentView(view, params); + } + + @Override + public void addContentView(View view, ViewGroup.LayoutParams params) { + getDelegate().addContentView(view, params); + } + + @Override + protected void onPostResume() { + super.onPostResume(); + getDelegate().onPostResume(); + } + + @Override + protected void onTitleChanged(CharSequence title, int color) { + super.onTitleChanged(title, color); + getDelegate().setTitle(title); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + getDelegate().onConfigurationChanged(newConfig); + } + + @Override + protected void onStop() { + super.onStop(); + getDelegate().onStop(); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + getDelegate().onDestroy(); + } + + public void invalidateOptionsMenu() { + getDelegate().invalidateOptionsMenu(); + } + + private AppCompatDelegate getDelegate() { + if (mDelegate == null) { + mDelegate = AppCompatDelegate.create(this, null); + } + return mDelegate; + } +} diff --git a/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakActivity.java b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakActivity.java new file mode 100644 index 0000000..29e151c --- /dev/null +++ b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakActivity.java @@ -0,0 +1,245 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + +import android.content.SharedPreferences; +import android.os.CountDownTimer; +import android.preference.PreferenceManager; +import android.support.design.widget.FloatingActionButton; +import android.support.design.widget.Snackbar; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; + +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentPagerAdapter; +import android.support.v4.view.ViewPager; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; + +import android.widget.Button; +import android.widget.TextView; + +public class BreakActivity extends AppCompatActivity implements View.OnClickListener{ + + /** + * The {@link android.support.v4.view.PagerAdapter} that will provide + * fragments for each of the sections. We use a + * {@link FragmentPagerAdapter} derivative, which will keep every + * loaded fragment in memory. If this becomes too memory intensive, it + * may be best to switch to a + * {@link android.support.v4.app.FragmentStatePagerAdapter}. + */ + private SectionsPagerAdapter mSectionsPagerAdapter; + + /** + * The {@link ViewPager} that will host the section contents. + */ + private ViewPager mViewPager; + private TextView ct_text; + private boolean isRunning = false; + private CountDownTimer ct; + private String stopTime = ""; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); + int mins = sharedPrefs.getInt("break_value", 10); + String bufferZeroMinute = ""; + + if(mins < 10) + bufferZeroMinute = "0"; + + System.out.println("Change the view"); + setContentView(R.layout.fragment_break); + + ct_text =(TextView)findViewById(R.id.textViewBreak); + ct_text.setText(bufferZeroMinute+mins+":00"); + + Button playStopButton = (Button)findViewById(R.id.button_playStopBreak); + playStopButton.setOnClickListener(this); + ct_text.setOnClickListener(this); + + setContentView(R.layout.activity_break); + + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + // Create the adapter that will return a fragment for each of the three + // primary sections of the activity. + mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); + + // Set up the ViewPager with the sections adapter. + mViewPager = (ViewPager) findViewById(R.id.container); + mViewPager.setAdapter(mSectionsPagerAdapter); + + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_break, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } + + /** + * A placeholder fragment containing a simple view. + */ + public static class PlaceholderFragment extends Fragment { + /** + * The fragment argument representing the section number for this + * fragment. + */ + private static final String ARG_SECTION_NUMBER = "section_number"; + + public PlaceholderFragment() { + } + + /** + * Returns a new instance of this fragment for the given section + * number. + */ + public static PlaceholderFragment newInstance(int sectionNumber) { + PlaceholderFragment fragment = new PlaceholderFragment(); + Bundle args = new Bundle(); + args.putInt(ARG_SECTION_NUMBER, sectionNumber); + fragment.setArguments(args); + return fragment; + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View rootView = inflater.inflate(R.layout.fragment_break, container, false); + TextView textView = (TextView) rootView.findViewById(R.id.section_label); + textView.setText(getString(R.string.section_format, getArguments().getInt(ARG_SECTION_NUMBER))); + return rootView; + } + } + + /** + * A {@link FragmentPagerAdapter} that returns a fragment corresponding to + * one of the sections/tabs/pages. + */ + public class SectionsPagerAdapter extends FragmentPagerAdapter { + + public SectionsPagerAdapter(FragmentManager fm) { + super(fm); + } + + @Override + public Fragment getItem(int position) { + // getItem is called to instantiate the fragment for the given page. + // Return a PlaceholderFragment (defined as a static inner class below). + return PlaceholderFragment.newInstance(position + 1); + } + + @Override + public int getCount() { + //TODO Do it dynamically + // Show 4 total pages. + return 4; + } + + @Override + public CharSequence getPageTitle(int position) { + + if (position > getCount() || position < 0) + return null; + + return "Exercise number "+position+1; + } + } + + public void onClick(View v) { + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); + int mins = sharedPrefs.getInt("break_value", 10); + String bufferZeroMinute = ""; + String bufferZeroSecond = ""; + int time = mins * 60 * 1000; + + if(stopTime == "" && !isRunning) { + if (time / 1000 / 60 < 10) + bufferZeroMinute = "0"; + + ct_text.setText(bufferZeroMinute + time / 1000 / 60 + ":00"); + } else if(!isRunning){ + ct_text.setText(stopTime); + String stringTime = (String)ct_text.getText(); + String[] timef = stringTime.split(":"); + int minute = Integer.parseInt(timef[0]); + int second = Integer.parseInt(timef[1]); + System.out.println("Minute: "+ minute + " Second: "+second); + time = (1000 * (minute*60)) + (1000 * second); + + if(minute < 10) + bufferZeroMinute = "0"; + if(second < 10) + bufferZeroSecond = "0"; + + ct_text.setText(bufferZeroMinute + minute + ":" + bufferZeroSecond + second); + } + + + System.out.println(time +" "+ ct_text.getText()); + + + + switch (v.getId()) { + + case R.id.textView: + case R.id.button_playStop: + if (isRunning){ + ct.cancel(); + stopTime = (String)ct_text.getText(); + isRunning = false; + }else{ + ct = new CountDownTimer(time, 1000) { + + public void onTick(long millisUntilFinished) { + String bufferZeroMinute = ""; + String bufferZeroSecond = ""; + + if ((millisUntilFinished / 1000)/60 < 10) + bufferZeroMinute = "0"; + + if (millisUntilFinished / 1000 % 60 < 10) + bufferZeroSecond = "0"; + + ct_text.setText(bufferZeroMinute+(millisUntilFinished / 1000)/60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60); + } + + public void onFinish() { + ct_text.setText("00:00"); + //TODO trigger the alarm + finish(); + //startBreak(); + } + }.start(); + isRunning = true; + } + break; + } + } + + +} diff --git a/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakDecider.java b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakDecider.java new file mode 100644 index 0000000..f5e7924 --- /dev/null +++ b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakDecider.java @@ -0,0 +1,34 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + +import android.content.Intent; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class BreakDecider extends AppCompatActivity implements View.OnClickListener { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_break_decider); + + Button skipButton = (Button)findViewById(R.id.button_skip); + skipButton.setOnClickListener(this); + Button breakButton = (Button)findViewById(R.id.button_break); + breakButton.setOnClickListener(this); + + } + + public void onClick(View v) { + switch (v.getId()) { + case R.id.button_skip: + finish(); + break; + case R.id.button_break: + Intent intent = new Intent(this, BreakActivity.class); + this.startActivity(intent); + break; + } + } +} diff --git a/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakReminder.java b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakReminder.java new file mode 100644 index 0000000..2a85f53 --- /dev/null +++ b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/BreakReminder.java @@ -0,0 +1,218 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.os.CountDownTimer; +import android.preference.PreferenceManager; +import android.view.View; +import android.support.design.widget.NavigationView; +import android.support.v4.view.GravityCompat; +import android.support.v4.widget.DrawerLayout; +import android.support.v7.app.ActionBarDrawerToggle; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.Menu; +import android.view.MenuItem; +import android.widget.Button; +import android.widget.TextView; + +public class BreakReminder extends AppCompatActivity + implements NavigationView.OnNavigationItemSelectedListener, View.OnClickListener{ + + private boolean isRunning = false; + private TextView ct_text; + private CountDownTimer ct; + private String stopTime = ""; + private SeekBarPreference _seekBarWork; + private SeekBarPreference _seekBarBreak; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_break_reminder); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); + ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( + this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); + drawer.setDrawerListener(toggle); + toggle.syncState(); + + NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); + navigationView.setNavigationItemSelectedListener(this); + + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); + int mins = sharedPrefs.getInt("work_value", 50); + String bufferZeroMinute = ""; + + if(mins < 10) + bufferZeroMinute = "0"; + + ct_text =(TextView)findViewById(R.id.textView); + ct_text.setText(bufferZeroMinute+mins+":00"); + + Button playStopButton = (Button)findViewById(R.id.button_playStop); + playStopButton.setOnClickListener(this); + Button resetButton = (Button)findViewById(R.id.button_reset); + resetButton.setOnClickListener(this); + ct_text.setOnClickListener(this); + + } + + @Override + public void onBackPressed() { + DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); + if (drawer.isDrawerOpen(GravityCompat.START)) { + drawer.closeDrawer(GravityCompat.START); + } else { + super.onBackPressed(); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.break_reminder, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } + + @SuppressWarnings("StatementWithEmptyBody") + @Override + public boolean onNavigationItemSelected(MenuItem item) { + // Handle navigation view item clicks here. + int id = item.getItemId(); + + if (id == R.id.nav_settings) { + // Handle the profile action + Intent intent = new Intent(this, SettingsActivity.class); + this.startActivity(intent); + } else if (id == R.id.nav_statistics) { + + } else if (id == R.id.nav_help) { + + } else if (id == R.id.nav_about) { + + } + + DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); + drawer.closeDrawer(GravityCompat.START); + return true; + } + + public void onClick(View v) { + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); + int mins = sharedPrefs.getInt("work_value", 50); + String bufferZeroMinute = ""; + String bufferZeroSecond = ""; + int time = mins * 60 * 1000; + int oldTime = time; + + if(stopTime == "" && !isRunning) { + if (time / 1000 / 60 < 10) + bufferZeroMinute = "0"; + + ct_text.setText(bufferZeroMinute + time / 1000 / 60 + ":00"); + } else if(!isRunning){ + ct_text.setText(stopTime); + String stringTime = (String)ct_text.getText(); + String[] timef = stringTime.split(":"); + int minute = Integer.parseInt(timef[0]); + int second = Integer.parseInt(timef[1]); + System.out.println("Minute: "+ minute + " Second: "+second); + time = (1000 * (minute*60)) + (1000 * second); + + if(minute < 10) + bufferZeroMinute = "0"; + if(second < 10) + bufferZeroSecond = "0"; + + ct_text.setText(bufferZeroMinute + minute + ":" + bufferZeroSecond + second); + } + + + System.out.println(time +" "+ ct_text.getText()); + + + + switch (v.getId()) { + + case R.id.textView: + case R.id.button_playStop: + if (isRunning){ + ct.cancel(); + stopTime = (String)ct_text.getText(); + isRunning = false; + }else{ + ct = new CountDownTimer(time, 1000) { + + public void onTick(long millisUntilFinished) { + String bufferZeroMinute = ""; + String bufferZeroSecond = ""; + + if ((millisUntilFinished / 1000)/60 < 10) + bufferZeroMinute = "0"; + + if (millisUntilFinished / 1000 % 60 < 10) + bufferZeroSecond = "0"; + + ct_text.setText(bufferZeroMinute+(millisUntilFinished / 1000)/60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60); + } + + public void onFinish() { + ct_text.setText("00:00"); + //TODO trigger the alarm + + startBreak(); + } + }.start(); + isRunning = true; + } + break; + + + case R.id.button_reset: + if (ct != null) + ct.cancel(); + + if(oldTime/1000/60 < 10) + bufferZeroMinute = "0"; + + ct_text.setText(bufferZeroMinute + oldTime/1000/60+":00"); + stopTime = oldTime/1000/60+":00"; + isRunning = false; + break; + } + } + + public void startBreak(){ + Intent intent = new Intent(this, BreakDecider.class); + this.startActivity(intent); + + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); + int mins = sharedPrefs.getInt("work_value", 50); + String bufferZeroMinute = ""; + int time = mins * 60 * 1000; + + if(time/1000/60 < 10) + bufferZeroMinute = "0"; + + ct_text.setText(bufferZeroMinute + time/1000/60+":00"); + } +} diff --git a/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SeekBarPreference.java b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SeekBarPreference.java new file mode 100644 index 0000000..35747f4 --- /dev/null +++ b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SeekBarPreference.java @@ -0,0 +1,169 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + +/** + * Created by badri_000 on 29.05.2016. + */ +import android.app.AlertDialog; +import android.content.Context; +import android.os.Bundle; +import android.preference.DialogPreference; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.LinearLayout; +import android.widget.SeekBar; +import android.widget.TextView; + + +public class SeekBarPreference extends DialogPreference implements SeekBar.OnSeekBarChangeListener, OnClickListener +{ + // ------------------------------------------------------------------------------------------ + // Private attributes : + private static final String androidns="http://schemas.android.com/apk/res/android"; + + private SeekBar mSeekBar; + private TextView mSplashText,mValueText; + private Context mContext; + + private String mDialogMessage, mSuffix; + private int mDefault, mMax, mValue = 0; + // ------------------------------------------------------------------------------------------ + + + + // ------------------------------------------------------------------------------------------ + // Constructor : + public SeekBarPreference(Context context, AttributeSet attrs) { + + super(context,attrs); + mContext = context; + + // Get string value for dialogMessage : + int mDialogMessageId = attrs.getAttributeResourceValue(androidns, "dialogMessage", 0); + if(mDialogMessageId == 0) mDialogMessage = attrs.getAttributeValue(androidns, "dialogMessage"); + else mDialogMessage = mContext.getString(mDialogMessageId); + + // Get string value for suffix (text attribute in xml file) : + int mSuffixId = attrs.getAttributeResourceValue(androidns, "text", 0); + if(mSuffixId == 0) mSuffix = attrs.getAttributeValue(androidns, "text"); + else mSuffix = mContext.getString(mSuffixId); + + // Get default and max seekbar values : + mDefault = attrs.getAttributeIntValue(androidns, "defaultValue", 0); + mMax = attrs.getAttributeIntValue(androidns, "max", 100); + } + // ------------------------------------------------------------------------------------------ + + + + // ------------------------------------------------------------------------------------------ + // DialogPreference methods : + @Override + protected View onCreateDialogView() { + + LinearLayout.LayoutParams params; + LinearLayout layout = new LinearLayout(mContext); + layout.setOrientation(LinearLayout.VERTICAL); + layout.setPadding(6,6,6,6); + + mSplashText = new TextView(mContext); + mSplashText.setPadding(30, 10, 30, 10); + if (mDialogMessage != null) + mSplashText.setText(mDialogMessage); + layout.addView(mSplashText); + + mValueText = new TextView(mContext); + mValueText.setGravity(Gravity.CENTER_HORIZONTAL); + mValueText.setTextSize(32); + params = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.FILL_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT); + layout.addView(mValueText, params); + + mSeekBar = new SeekBar(mContext); + mSeekBar.setOnSeekBarChangeListener(this); + layout.addView(mSeekBar, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); + + if (shouldPersist()) + mValue = getPersistedInt(mDefault); + + mSeekBar.setMax(mMax); + mSeekBar.setProgress(mValue); + + return layout; + } + + @Override + protected void onBindDialogView(View v) { + super.onBindDialogView(v); + mSeekBar.setMax(mMax); + mSeekBar.setProgress(mValue); + } + + @Override + protected void onSetInitialValue(boolean restore, Object defaultValue) + { + super.onSetInitialValue(restore, defaultValue); + if (restore) + mValue = shouldPersist() ? getPersistedInt(mDefault) : 0; + else + mValue = (Integer)defaultValue; + } + // ------------------------------------------------------------------------------------------ + + + + // ------------------------------------------------------------------------------------------ + // OnSeekBarChangeListener methods : + @Override + public void onProgressChanged(SeekBar seek, int value, boolean fromTouch) + { + String t = String.valueOf(value); + mValueText.setText(mSuffix == null ? t : t.concat(" " + mSuffix)); + } + + @Override + public void onStartTrackingTouch(SeekBar seek) {} + @Override + public void onStopTrackingTouch(SeekBar seek) {} + + public void setMax(int max) { mMax = max; } + public int getMax() { return mMax; } + + public void setProgress(int progress) { + mValue = progress; + if (mSeekBar != null) + mSeekBar.setProgress(progress); + } + public int getProgress() { return mValue; } + // ------------------------------------------------------------------------------------------ + + + + // ------------------------------------------------------------------------------------------ + // Set the positive button listener and onClick action : + @Override + public void showDialog(Bundle state) { + + super.showDialog(state); + + Button positiveButton = ((AlertDialog) getDialog()).getButton(AlertDialog.BUTTON_POSITIVE); + positiveButton.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + + if (shouldPersist()) { + + mValue = mSeekBar.getProgress(); + persistInt(mSeekBar.getProgress()); + callChangeListener(Integer.valueOf(mSeekBar.getProgress())); + } + + getDialog().dismiss(); + } + // ------------------------------------------------------------------------------------------ +} diff --git a/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SettingsActivity.java b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SettingsActivity.java new file mode 100644 index 0000000..f2ed596 --- /dev/null +++ b/app/src/main/java/orgprivacy_friendly_apps/secuso/privacyfriendlybreakreminder/SettingsActivity.java @@ -0,0 +1,269 @@ +package orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder; + + +import android.annotation.TargetApi; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.media.Ringtone; +import android.media.RingtoneManager; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.preference.ListPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.support.v7.app.ActionBar; +import android.preference.PreferenceFragment; +import android.preference.PreferenceManager; +import android.preference.RingtonePreference; +import android.text.TextUtils; +import android.view.MenuItem; +import android.support.v4.app.NavUtils; +import android.widget.TextView; +import orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder.SeekBarPreference; + +import java.util.List; + +/** + * A {@link PreferenceActivity} that presents a set of application settings. On + * handset devices, settings are presented as a single list. On tablets, + * settings are split by category, with category headers shown to the left of + * the list of settings. + *

+ * See + * Android Design: Settings for design guidelines and the Settings + * API Guide for more information on developing a Settings UI. + */ +public class SettingsActivity extends AppCompatPreferenceActivity { + /** + * A preference value change listener that updates the preference's summary + * to reflect its new value. + */ + private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object value) { + String stringValue = value.toString(); + + if (preference instanceof ListPreference) { + // For list preferences, look up the correct display value in + // the preference's 'entries' list. + ListPreference listPreference = (ListPreference) preference; + int index = listPreference.findIndexOfValue(stringValue); + + // Set the summary to reflect the new value. + preference.setSummary( + index >= 0 + ? listPreference.getEntries()[index] + : null); + + } else if (preference instanceof RingtonePreference) { + // For ringtone preferences, look up the correct display value + // using RingtoneManager. + if (TextUtils.isEmpty(stringValue)) { + // Empty values correspond to 'silent' (no ringtone). + preference.setSummary(R.string.pref_ringtone_silent); + + } else { + Ringtone ringtone = RingtoneManager.getRingtone( + preference.getContext(), Uri.parse(stringValue)); + + if (ringtone == null) { + // Clear the summary if there was a lookup error. + preference.setSummary(null); + } else { + // Set the summary to reflect the new ringtone display + // name. + String name = ringtone.getTitle(preference.getContext()); + preference.setSummary(name); + } + } + + } else { + // For all other preferences, set the summary to the value's + // simple string representation. + preference.setSummary(stringValue); + } + return true; + } + }; + + /** + * Helper method to determine if the device has an extra-large screen. For + * example, 10" tablets are extra-large. + */ + private static boolean isXLargeTablet(Context context) { + return (context.getResources().getConfiguration().screenLayout + & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE; + } + + /** + * Binds a preference's summary to its value. More specifically, when the + * preference's value is changed, its summary (line of text below the + * preference title) is updated to reflect the value. The summary is also + * immediately updated upon calling this method. The exact display format is + * dependent on the type of preference. + * + * @see #sBindPreferenceSummaryToValueListener + */ + private static void bindPreferenceSummaryToValue(Preference preference) { + // Set the listener to watch for value changes. + preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener); + + // Trigger the listener immediately with the preference's + // current value. + sBindPreferenceSummaryToValueListener.onPreferenceChange(preference, + PreferenceManager + .getDefaultSharedPreferences(preference.getContext()) + .getString(preference.getKey(), "")); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setupActionBar(); + } + + /** + * Set up the {@link android.app.ActionBar}, if the API is available. + */ + private void setupActionBar() { + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + // Show the Up button in the action bar. + actionBar.setDisplayHomeAsUpEnabled(true); + } + } + + @Override + public boolean onMenuItemSelected(int featureId, MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + if (!super.onMenuItemSelected(featureId, item)) { + NavUtils.navigateUpFromSameTask(this); + } + return true; + } + return super.onMenuItemSelected(featureId, item); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean onIsMultiPane() { + return isXLargeTablet(this); + } + + /** + * {@inheritDoc} + */ + @Override + @TargetApi(Build.VERSION_CODES.HONEYCOMB) + public void onBuildHeaders(List

target) { + loadHeadersFromResource(R.xml.pref_headers, target); + } + + /** + * This method stops fragment injection in malicious applications. + * Make sure to deny any unknown fragments here. + */ + protected boolean isValidFragment(String fragmentName) { + return PreferenceFragment.class.getName().equals(fragmentName) + || GeneralPreferenceFragment.class.getName().equals(fragmentName) + || NotificationPreferenceFragment.class.getName().equals(fragmentName); + } + + /** + * This fragment shows general preferences only. It is used when the + * activity is showing a two-pane settings UI. + */ + @TargetApi(Build.VERSION_CODES.HONEYCOMB) + public static class GeneralPreferenceFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener { + + private SeekBarPreference _seekBarWork; + private SeekBarPreference _seekBarBreak; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.pref_general); + setHasOptionsMenu(true); + + // Get widgets : + _seekBarWork = (SeekBarPreference) this.findPreference("work_value"); + _seekBarBreak = (SeekBarPreference) this.findPreference("break_value"); + + // Set listener : + getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); + + // Set seekbar summary : + int radius = PreferenceManager.getDefaultSharedPreferences(this.getActivity()).getInt("work_value", 50); + _seekBarWork.setSummary(this.getString(R.string.settings_summary).replace("$1", ""+radius)); + + radius = PreferenceManager.getDefaultSharedPreferences(this.getActivity()).getInt("break_value", 10); + _seekBarBreak.setSummary(this.getString(R.string.settings_summary).replace("$1", ""+radius)); + + + // Bind the summaries of EditText/List/Dialog/Ringtone preferences + // to their values. When their values change, their summaries are + // updated to reflect the new value, per the Android Design + // guidelines. + bindPreferenceSummaryToValue(findPreference("name_text")); + //bindPreferenceSummaryToValue(findPreference("example_list")); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + startActivity(new Intent(getActivity(), SettingsActivity.class)); + return true; + } + return super.onOptionsItemSelected(item); + } + + + @Override + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + + // Set seekbar summary : + int radius = PreferenceManager.getDefaultSharedPreferences(this.getActivity()).getInt("work_value", 50); + _seekBarWork.setSummary(this.getString(R.string.settings_summary).replace("$1", ""+radius)); + radius = PreferenceManager.getDefaultSharedPreferences(this.getActivity()).getInt("break_value", 10); + _seekBarBreak.setSummary(this.getString(R.string.settings_summary).replace("$1", ""+radius)); + } + } + + /** + * This fragment shows notification preferences only. It is used when the + * activity is showing a two-pane settings UI. + */ + @TargetApi(Build.VERSION_CODES.HONEYCOMB) + public static class NotificationPreferenceFragment extends PreferenceFragment { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.pref_notification); + setHasOptionsMenu(true); + + // Bind the summaries of EditText/List/Dialog/Ringtone preferences + // to their values. When their values change, their summaries are + // updated to reflect the new value, per the Android Design + // guidelines. + bindPreferenceSummaryToValue(findPreference("notifications_new_message_ringtone")); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + startActivity(new Intent(getActivity(), SettingsActivity.class)); + return true; + } + return super.onOptionsItemSelected(item); + } + } +} diff --git a/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_info_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..da56077636546c97764fd2686daad67d7b529f59 GIT binary patch literal 321 zcmV-H0lxl;P)H-qjnO!mZF74z`KYHotZQj~G9OBG_t^ED_kIXRP z8;w~~Qsa5P=BYWdU__EBJMKte9gdtxYdq4khJueW&Pc>cvi{6361huX>Wn1p1Yv6= zaRmWW!dHC7;kXjM_MA66Bsd3vLxS6)G3IUxb&OD!2oiZTy*WyW7pRP32C|k0wldT1B8Lp22U5qkP61PXEvTZ6d>a8@UZ?1 zA+c-66fgaBRuc>lIKkqWwEBhLN~4B^=^YF1?lx0w{jkHlvNhq4U%kY(4%UYj${gxU zt{#`?C=^ypw+}YdKA#S3~g6)IW)n6udaq z+)GOiED3ODRoiN{EBVotiHBXj>?{2uy>wZi)V_=1zmDyj)K|Gw_IHc)r4T`te0NDl hwI^3XQhFp;iAM+Z&9%(1ZU(xY!PC{xWt~$(698`;Th;&o literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_sync_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..a5ebdbd072989517b8c6230f65f7064d7c2ac017 GIT binary patch literal 368 zcmV-$0gwKPP)Bnh6NK+0$5`HOv#KS=tYj%F$hmx(`HEa6MGCz zVd+xXR3C*q>XmoYu)EvRqLNoKN9vrWebtl-5=snnhoS^g9uF~&xlN*)H`W{wZ;U+{TXN|u|AX!W%Mvu1 zCO7Tl*uo`~E>@u<#XBj|^}>ul|6C>19PJEUR$ER;nAhbpt#9Vs*Ef&3bU%Gs$9S4s WW8+=f3r;`>GkCiCxvXjCCUMHOLgs0@uOIM+hc=c_OeCtYY$lmfH>|_qY(a5Lp zBC`?BMt+0`nYqvz>4i$B5_%&SVO?^iM%c@|3GYT~gU&Mf*o80860LBx0>q!>QEKKS zbPhJ=;$MP1X$|6brX|#l&bsLVpmeTu&enbW0-8ozYX{n?_5c6?07*qoM6N<$f=D}Y AIRF3v literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-v21/ic_info_black_24dp.xml b/app/src/main/res/drawable-v21/ic_info_black_24dp.xml new file mode 100644 index 0000000..34b8202 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_info_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_manage.xml b/app/src/main/res/drawable-v21/ic_menu_manage.xml new file mode 100644 index 0000000..c1be60b --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_manage.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_notifications_black_24dp.xml b/app/src/main/res/drawable-v21/ic_notifications_black_24dp.xml new file mode 100644 index 0000000..e3400cf --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_notifications_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_sync_black_24dp.xml b/app/src/main/res/drawable-v21/ic_sync_black_24dp.xml new file mode 100644 index 0000000..5a283aa --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_sync_black_24dp.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_info_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..46ed12a89bd7303d12a00edee53504903c9fdaf1 GIT binary patch literal 412 zcmV;N0b~A&P)k7>D5($61se024W16Y9PdLry5vdn5qWG7(8}rf#0;i^i3`Bz)3@LmB1SV3Ir;F zXA1R55y$7>4m@$40i?z@(7tAuhqf9h{9DK(kS9VPYq@pj?P({$*j*$70e+edaK1ul_2NP&A~Pg39!*_#v? zkeRk$7|4Mf$N?t@T-x(e!eI;N(w!F)7P$0*|EtF)>xk}V7O04Biy9mEOaUnp*K{AN cD9HYhcl4RW{G`P`$^ZZW07*qoM6N<$f+&V{8UO$Q literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_sync_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..860a5db38b393009a7407ced8d9fec8da0b460e1 GIT binary patch literal 467 zcmV;^0WAKBP)Y8m235b4thfjq5s2xGL-&my=8Y}rO#iqNL_sAt7# zbGQi8aPN&dD}Q(UKmQ-YoO`)AM%MLWT`$)4VqGuR^3-I(3JalY4Vwc%W0i@p9B?ix{5h)DbUhjrRWQ zC$I66YjjKu6StQJ zPo5IU6w&jpC@59DAecvdaf&5rK~PjglW}m0Jwp-{q$)-COd;&Jrcaw1Qk^1WgA`Ad ziaHZcwhG9|xiJ$cDFbG#IB*wVAB%B4*7aD|V_lDRJ&d?8{sN$?X^Ds6w;2Ec002ov JPDHLkV1g1j%<2FD literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_info_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..a81eeb9ee7ef8ab1662b5b6bc88cf74912e4cb5c GIT binary patch literal 579 zcmV-J0=)f+P)YDX|Txx7F9T)MSz5C z%me$p#<(@Ec}8Mx!WA`)S?3W+u@6bG_Q+CN{iWZ6iFpgn8im7?Un+GeL)QF6AA4ghWDNXmU%KBG@?RmKM)K1 zMojBSqWw=2twt=5)`ISdVGXesBvgrXZ8hkU2o;{K22Jn?b%0n667~qyLM-o&5Jdv( zL4TP?X$x_%4U`&Af{svXIte;OspBN5jZz=6{@DvXl!i`%1}Ftig2q!9G`&wY{XgoC zlb|+AO(#JoC^eh}9ip`9BT! zt3hvwp=B+|Cze%9K`*Qj(>Y>cXT-L|$au~Wj|A$*gSJWNv(cQ7Bv#Y(JK#w*j9P*Yqa=F};`Uf%+Z6V(b RSUCUy002ovPDHLkV1jt6`k4R# literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..ab8a9c464c6c30f54a49d18e1d48b3b8637a9295 GIT binary patch literal 383 zcmV-_0f7FAP)z9Eb5|s``^)CE_}yje)z64pu{@M5;_j>;{9|U?dVTN(BQGf?Y^x(n#9o)!|G% zjU4BEPu~u|&vOG0CJAFqk!rUBLt&b8T-X^?co*)3o#I&$*V6)CRU<=Ncojs30vigA zQsRV0WT?S0E94odF?RXD{n0zygPU6B6&Ist78!sYI=Gm%sgSV)+&|kVLp5B2*2%~c zokT+|3ZOU68!lmw`W^j}en-C~ z-w`ZncLYl=0<4vB2$j%)(JeuRaXJ-b_M%dt*X16+J datt|R%rC40J4*F-*<%0z002ovPDHLkV1n31phf@y literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_sync_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..f7990080d1d7d7e30b1844c18be8928128af147c GIT binary patch literal 669 zcmV;O0%HA%P)Ri)#A+rN#ZV}M#KrnQ=uoUdx&}e)B(84V)X*Zhb`j|=Sg}(VanQLY z)jde5NeBw@b}N@>BJX?O$-+X_Zyy1Q~JX9W8v!)}~bi|sDSkn<}I$}*ntm%j~ z9kHe(+;B;meM-zT*nOQ~j#(ySLPw>+CRr0gDs@&#*-{ct8MUTVV>WrE=cE~@z!sG@ zN-c^>D`}?Kp%s)$S}DjF2Y0^GOt&A`B27f)iji)gA9<>X$_XjF_`tB|ftCv>t>D2c zYFva=>dYif^r{>pGMfkzQt3Vx5tVf!(nkXct#m(!=r=AyBtEK=GClZ^L+_;}B5|xL zzT(TSYC9qVSwtm|FVm{+mI0huPzAs6=LzSkaSmrbtML+Xu&o+5aOQ^^e@7hXZ@z~! zzt#9_;$T8Gp5aVQjlU!g`c-2UXKvN_Q{tdkHD2S)4f-04gC6v4WI#|=enhvb-FnQ!32goiP%3qR|00000NkvXXu0mjf DBY7@j literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_info_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..c8f86b925366485cef1f43c089f785ab8415068d GIT binary patch literal 766 zcmVDuaOF?qdkw!ZaV?`>xjy6gVLBv5If;S){v5mCXA=Y@H1rfw?2k|s36`TsO zNHkbQ$!A*+5eLd!$4>T2_S$>D#r=D(;16rBEP_R$P$(1%^^m2=ItNs!^UUj8&(x`~ z&l*LtbfZ#|309~g2Axu3oCHcl$g<57(qs*`7$HKSIw(*>Ty)MH?F1shPyB;e=#~ZI z_$<#QVzCQy_@bx0J~enA3k6_=)wfSbaFejbp3yC+S{ z_7DY?X;B_gQjQiRTt1lJbNASe)3hHEH3Nk2X;KG&s~Yf`BuyzGss;$NVD1ZQ>IR$< z!B`eiH$cc>Y+L1kO$;S@QaRv}I7TKArHx@^1yR}(MyiO?PB74eD6Y%=3f0*#j*5ul z=5e%+D6WK~14MDVII194dQYr$jH9~h0XH~$Rz0ABqgT}fUjFw3KEM%D{t z0UH<_Q90l{j72zCH=xQV%rU2Kzzj`k=T_B#ItiMzplU#Yrp38XGoVI{7UU2mP12$= zqM+YsSs!;u!2L@vF65Db%i+>05@0{$T9iX1pnj(f3sO{(06L`;O9r??eD0Do77h74 z;V-_%vH{L~JUnSU(9NMwpKd1}iL!=x+!AegYKnUge|2;CAWhk$H%~9V$#H>L?3_t_ z7Uu^(BNnPtAVwgP%(}c>tIUufP!Te0^4P-PR2zKDCzOaY#u9%b231&Olo%?d7-pUl wyBu>vgO|4&+;Gee%M{4ag*Bm2C=?3)2UQ-CT`xs~ZvX%Q07*qoM6N<$g2UHD;{X5v literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..86f89d75000ada881e4c14891ceec47c27c7fb0d GIT binary patch literal 497 zcmVtWS;T; zaYBz`tPu^nL@|bq0naE#)fn)NVnp*CkjTQsfCVzQ#5%jgl8xP!>8N(0U!w=NC1j@$!jz5g literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_sync_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..b9f56f327d6346a39fa6f69d8827ff0be7a4337d GIT binary patch literal 875 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%&M7z-;8{;uuoF_;%J_Z=H0J_W3g( z>AlH{ab;?9Jg@dus zS3Fj^r{zaz$Fn8&d}%W(?;Egx`}y_xAGvkbzxP>-ufMV)F!@|n?Z&wHHP^*oe?5wo z*(xr#vgi7N3?sowUJv(kS~`R% zow7(}bPUo|SvZet(WVAxsUOmwD<|~i{SA0Jjcv|H-KHfW9;dh#88sV!vHwuMW4TLc z?n;3NEp{$XwQCG|SA2Qc5^DNw7L%QZ&`RIc7LN4~*FWgi-TG35eT$OT-5-m@12Ywk z4`)4*|DpUKDpy*`xI61f|BsaL+}Y~JzxMp#wVN4q``d{#ol-yL=JTw|J)YuLzqh8z z|JK!Q+(w^QxJ~=ux%t*NhqQlz%FH!E0k`L!Jj4B~TyB2LueVLV?H8)me44mVe)oTY z?GGoLeV0%ADLma@Wb+3-&*@0 zm+`E+S*O?kbK^c8_wV_OIqO#k&$L$k;39r3-p+pV|bchu(99KY6clnh~I|v&r15vZHo?-24CqcCN)9K3XN}A}1OT zxve=QtUaZ}y=d`*_!BEbW-dFCt&-2h$|v|pc%!R+qu7c0hwMJNt-G1p<#;P|S;Lb+ z#T4F?6J#_FaD2ZeYGtu$oq&;BN;IQX6N%zUvB3!n~xic v+kD7bYbW*k>&7^F?8L|D{cgQd|C!2ftO$D&n7s#>i5NUx{an^LB{Ts5h>e~y literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/side_nav_bar.xml b/app/src/main/res/drawable/side_nav_bar.xml new file mode 100644 index 0000000..24610b9 --- /dev/null +++ b/app/src/main/res/drawable/side_nav_bar.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statistic_logo.png b/app/src/main/res/drawable/statistic_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b67197347ce799426b1f7ef2c63575f4b0330b00 GIT binary patch literal 18528 zcmeHvc|4SB-1i_9h?N}RpYNEKSp-5yM)%NuBTUCwBG&`a%dz8%dIm+Qsg8$?@DieeO=r3a{Z47$ z_=l)xG~l;F=Slh%R*P_w3;KN5qY+b7=nAx8#E3ik!z<#q{cYzpvqtudx7C+-s(pKw zPGUdIdqdmlh3=DL8HpWt)XvnIRL0yfYWx0=Nr`0x3OD4l`w30Oljf5SLG+^1@$>m% z;=a_rAoxGF50N8nDmUj;^+PvfCVI;QIC*fU_(1w(pCp@@2ICjo^{9tgl0&t@>kBQq zIGMk3%6nSK6EvuS^?4giFDWoz6vMCZESa0ci?hp3hU#%FydEQw9b+jrS8+;i_0K=b zU#ju3azmP>vL^DtU0XtDp^kR zzGqG!yihR>NzcBl>z-_l4co)S$X#smdly%n{d8>O$~D?qo#++p4Tv!E#Y#qdObz(} zHxGB2PD>M3U+q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=TnGBuP~hVFV{NoZrU>APx;$vvGhTTpr3Dh|8Mo~i>ag_blh5Q|o%qrk zntsN|)-8U2BfyELvoN3_#;YS|Y)|1rTgK$)x$?f6k)?W4MD1M|EBVkA%x z3D|Nj6lYS60y literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/activity_break.xml b/app/src/main/res/layout/activity_break.xml new file mode 100644 index 0000000..ed943d4 --- /dev/null +++ b/app/src/main/res/layout/activity_break.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_break_decider.xml b/app/src/main/res/layout/activity_break_decider.xml new file mode 100644 index 0000000..16bdaed --- /dev/null +++ b/app/src/main/res/layout/activity_break_decider.xml @@ -0,0 +1,43 @@ + + + +