diff --git a/app/build.gradle b/app/build.gradle index a6f454c47..4c9120fe5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,8 +38,8 @@ repositories { // Version number def versionMajor = 5 // Major UI overhauls -def versionMinor = 5 // Some new functionality -def versionPatch = 6 // Bug fixes +def versionMinor = 6 // Some new functionality +def versionPatch = 0 // Bug fixes def versionBuild = 0 // Bump for dogfood builds, public betas, etc. // Version name from git diff --git a/app/src/main/java/com/nononsenseapps/notepad/fragments/TaskDetailFragment.java b/app/src/main/java/com/nononsenseapps/notepad/fragments/TaskDetailFragment.java index 0a0894d31..a41cf6be8 100644 --- a/app/src/main/java/com/nononsenseapps/notepad/fragments/TaskDetailFragment.java +++ b/app/src/main/java/com/nononsenseapps/notepad/fragments/TaskDetailFragment.java @@ -390,6 +390,8 @@ void setListeners() { final SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(getActivity()); + taskText.setTitleRelativeLarger(prefs.getBoolean( + getString(R.string.pref_editor_biggertitles), true)); taskText.setTitleFontFamily(Integer.parseInt(prefs.getString( getString(R.string.pref_editor_title_fontfamily), "2"))); taskText.setTitleFontStyle(Integer.parseInt(prefs.getString( diff --git a/app/src/main/java/com/nononsenseapps/utils/views/StyledEditText.java b/app/src/main/java/com/nononsenseapps/utils/views/StyledEditText.java index 618843075..953da043a 100644 --- a/app/src/main/java/com/nononsenseapps/utils/views/StyledEditText.java +++ b/app/src/main/java/com/nononsenseapps/utils/views/StyledEditText.java @@ -1,17 +1,18 @@ /* - * Copyright (c) 2014 Jonas Kalderstam. + * Copyright (c) 2015 Jonas Kalderstam. * - * 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 + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * http://www.apache.org/licenses/LICENSE-2.0 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * - * 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. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package com.nononsenseapps.utils.views; @@ -54,6 +55,7 @@ public class StyledEditText extends EditText { private int mBodyFontFamily; private int mTitleFontStyle; private boolean mLinkify; + private boolean mTitleLarger = true; public StyledEditText(Context context, AttributeSet attrs) { super(context, attrs); @@ -75,7 +77,7 @@ public StyledEditText(Context context, AttributeSet attrs) { a.recycle(); } - titleSizeSpan = new RelativeSizeSpan(mTitleRelativeSize); + setTitleRelativeLarger(mTitleLarger); setTitleFontFamily(mTitleFontFamily); @@ -108,6 +110,15 @@ public void afterTextChanged(Editable s) { } }); } + + /** + * + * @param larger true will use layout defined size, else same size + */ + public void setTitleRelativeLarger(final boolean larger) { + mTitleLarger = larger; + titleSizeSpan = new RelativeSizeSpan(larger ? mTitleRelativeSize : 1.0f); + } /** * diff --git a/app/src/main/res/values/constants.xml b/app/src/main/res/values/constants.xml index 0b13a8610..fafe694ad 100644 --- a/app/src/main/res/values/constants.xml +++ b/app/src/main/res/values/constants.xml @@ -1,19 +1,20 @@ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + --> 0 @@ -61,6 +62,7 @@ pref_editor_body_fontfamily pref_editor_links pref_editor_fontsize + pref_editor_biggertitles pref_restart_list_title_fontfamily pref_restart_list_title_fontstyle diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0d3c34612..de9a70379 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,6 @@ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + --> + android:key="preference_screen"> @@ -65,6 +65,11 @@ android:entryValues="@array/fontsize_values" android:summary="Selected option should be here" android:title="@string/text_size" /> +