Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Commit

Permalink
Added start screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Jizzu committed Mar 2, 2018
1 parent ea3bea4 commit be5fc8d
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 19
targetSdkVersion 26
versionCode 2
versionName "0.7"
versionName "0.9"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -34,5 +34,6 @@ dependencies {
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.github.XunMengWinter:CircularAnim:0.3.4'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'io.github.tonnyl:whatsnew:0.1.1'
testCompile 'junit:junit:4.12'
}
17 changes: 17 additions & 0 deletions app/src/main/java/apps/jizzu/simpletodo/activity/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
Expand Down Expand Up @@ -40,6 +41,9 @@
import apps.jizzu.simpletodo.utils.MyApplication;
import apps.jizzu.simpletodo.utils.PreferenceHelper;
import apps.jizzu.simpletodo.widget.WidgetProvider;
import io.github.tonnyl.whatsnew.WhatsNew;
import io.github.tonnyl.whatsnew.item.WhatsNewItem;
import io.github.tonnyl.whatsnew.util.PresentationOption;
import top.wefor.circularanim.CircularAnim;

import static android.content.ContentValues.TAG;
Expand Down Expand Up @@ -67,6 +71,19 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// Set up "What's New" screen
WhatsNew whatsNew = WhatsNew.newInstance(
new WhatsNewItem(getString(R.string.whats_new_item_1_title), getString(R.string.whats_new_item_1_text), R.drawable.whats_new_search),
new WhatsNewItem(getString(R.string.whats_new_item_2_title), getString(R.string.whats_new_item_2_text), R.drawable.whats_new_bug_fixes),
new WhatsNewItem(getString(R.string.whats_new_item_3_title), getString(R.string.whats_new_item_3_text), R.drawable.whats_new_start_screen)
);
whatsNew.setTitleColor(ContextCompat.getColor(this, R.color.colorAccent));
whatsNew.setTitleText(getString(R.string.whats_new_title));
whatsNew.setButtonText(getString(R.string.whats_new_button_text));
whatsNew.setButtonBackground(ContextCompat.getColor(this, R.color.colorAccent));
whatsNew.setButtonTextColor(ContextCompat.getColor(this, R.color.white));
whatsNew.presentAutomatically(MainActivity.this);

mContext = MainActivity.this;
setTitle("");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ private void addLicenses() {
findPreference("circular_anim").setOnPreferenceClickListener(
createPreferenceClickListener("https://github.com/XunMengWinter/CircularAnim")
);
findPreference("whats_new").setOnPreferenceClickListener(
createPreferenceClickListener("https://github.com/TonnyL/WhatsNew")
);
}

private Preference.OnPreferenceClickListener createPreferenceClickListener(
Expand Down
Binary file added app/src/main/res/drawable/whats_new_bug_fixes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/whats_new_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/whats_new_start_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<string name="preferences_send_feedback_title">Написать автору</string>
<string name="preferences_send_feedback_summary">Предлагайте свои идеи и сообщайте о багах</string>
<string name="preferences_about_version_title">Версия</string>
<string name="preferences_about_version_summary">0.7 Публичная Бета Версия</string>
<string name="preferences_about_version_summary">0.9 Публичная Бета Версия</string>
<string name="preferences_about_licenses_title">Использованные библиотеки</string>
<string name="preferences_about_licenses_summary">Лицензии</string>

Expand Down Expand Up @@ -50,4 +50,13 @@
<string name="action_delete">Удалить</string>
<string name="dialog_title">Вы уверены?</string>
<string name="dialog_message">Удалить эту задачу?</string>

<string name="whats_new_title">Что нового?</string>
<string name="whats_new_button_text">Продолжить</string>
<string name="whats_new_item_1_title">Поиск</string>
<string name="whats_new_item_2_title">Исправления</string>
<string name="whats_new_item_3_title">Стартовый экран</string>
<string name="whats_new_item_1_text">Добавлена возможность поиска.</string>
<string name="whats_new_item_2_text">Исправлены некоторые ошибки.</string>
<string name="whats_new_item_3_text">Добавлен стартовый экран с актуальной информацией об обновлениях.</string>
</resources>
11 changes: 10 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<string name="preferences_send_feedback_title">Send feedback</string>
<string name="preferences_send_feedback_summary">Suggest ideas or tell about bugs</string>
<string name="preferences_about_version_title">Version</string>
<string name="preferences_about_version_summary">0.7 Public Beta Version</string>
<string name="preferences_about_version_summary">0.9 Public Beta Version</string>
<string name="preferences_about_licenses_title">Used libraries</string>
<string name="preferences_about_licenses_summary">Licenses</string>

Expand Down Expand Up @@ -51,4 +51,13 @@
<string name="action_delete">Delete</string>
<string name="dialog_title">Are you sure?</string>
<string name="dialog_message">Delete this task?</string>

<string name="whats_new_title">What\'s New?</string>
<string name="whats_new_button_text">Continue</string>
<string name="whats_new_item_1_title">Search</string>
<string name="whats_new_item_2_title">Bug fixes</string>
<string name="whats_new_item_3_title">Start screen</string>
<string name="whats_new_item_1_text">Added searching feature.</string>
<string name="whats_new_item_2_text">Some bugs are fixed.</string>
<string name="whats_new_item_3_text">Added start screen with actual information about updates.</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/xml/about_licences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@
android:key="circular_anim"
android:summary="XunMengWinter"
android:title="CircularAnim" />
<Preference
android:key="whats_new"
android:summary="TonnyL"
android:title="WhatsNew" />
</PreferenceScreen>

0 comments on commit be5fc8d

Please sign in to comment.