This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository say-my-texts. See http://git.chorem.org/say-my-texts.git commit e07258c8dc4870fddeaf57c4c79103ece003c951 Author: Kevin Morin <morin@codelutin.com> Date: Fri Jul 31 18:24:44 2015 +0200 - remove appcompat (more problems than it solves) - use material design if over version 21 refs #1103 --- AndroidManifest.xml | 10 ++----- pom.xml | 26 ++-------------- res/drawable/actionbar_logo.xml | 7 +++++ res/layout/preferences.xml | 35 ---------------------- res/values-v21/themes.xml | 16 ++++++++++ res/values/colors.xml | 5 ++++ res/values/themes.xml | 13 +------- res/xml/preferences.xml | 6 ---- .../android/saymytexts/SettingsActivity.java | 11 ++----- 9 files changed, 36 insertions(+), 93 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3448c5a..1ae5b3e 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -6,8 +6,8 @@ android:description="@string/app_description" android:installLocation="auto"> - <uses-sdk android:minSdkVersion="15" - android:targetSdkVersion="17"/> + <uses-sdk android:minSdkVersion="21" + android:targetSdkVersion="22"/> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.CALL_PHONE" /> @@ -59,12 +59,6 @@ </intent-filter> </receiver> - <receiver android:name=".broadcastreceiver.MediaButtonIntentReceiver"> - <intent-filter> - <action android:name="android.intent.action.MEDIA_BUTTON" /> - </intent-filter> - </receiver> - <!-- Crash report dialog--> <activity android:name="org.acra.CrashReportDialog" android:launchMode="singleInstance" diff --git a/pom.xml b/pom.xml index 6f942cc..8fe8832 100644 --- a/pom.xml +++ b/pom.xml @@ -145,26 +145,6 @@ <scope>test</scope> </dependency> - <dependency> - <groupId>android.support</groupId> - <artifactId>compatibility-v4</artifactId> - <version>${compatibilityVersion}</version> - </dependency> - - <dependency> - <groupId>android.support</groupId> - <artifactId>compatibility-v7-appcompat</artifactId> - <version>${compatibilityVersion}</version> - <type>jar</type> - </dependency> - - <dependency> - <groupId>android.support</groupId> - <artifactId>compatibility-v7-appcompat</artifactId> - <version>${compatibilityVersion}</version> - <type>apklib</type> - </dependency> - <!--<dependency>--> <!--<groupId>cn.kongnannan</groupId>--> <!--<artifactId>preferencefragment</artifactId>--> @@ -199,9 +179,9 @@ </resources> <plugins> <plugin> - <groupId>com.jayway.maven.plugins.android.generation2</groupId> + <groupId>com.simpligility.maven.plugins</groupId> <artifactId>android-maven-plugin</artifactId> - <version>4.0.0-rc.2</version> + <version>4.3.0</version> <executions> <execution> <id>alignApk</id> @@ -213,7 +193,7 @@ </executions> <configuration> <sdk> - <platform>21</platform> + <platform>22</platform> </sdk> <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile> <resourceDirectory>${project.basedir}/res</resourceDirectory> diff --git a/res/drawable/actionbar_logo.xml b/res/drawable/actionbar_logo.xml new file mode 100644 index 0000000..b352472 --- /dev/null +++ b/res/drawable/actionbar_logo.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + + <item android:drawable="@drawable/ic_menu_logo" + android:right="10dp"/> + +</layer-list> \ No newline at end of file diff --git a/res/layout/preferences.xml b/res/layout/preferences.xml deleted file mode 100644 index b2afeec..0000000 --- a/res/layout/preferences.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2006 The Android Open Source Project - - 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. ---> - -<!-- Layout used by PreferenceScreen. This is inflated inside - android.R.layout.preference. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - - <android.support.v7.widget.Toolbar - android:id="@+id/my_toolbar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize"/> - - <FrameLayout android:id="@android:id/content" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1"/> - -</LinearLayout> diff --git a/res/values-v21/themes.xml b/res/values-v21/themes.xml new file mode 100644 index 0000000..f28d4c1 --- /dev/null +++ b/res/values-v21/themes.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> + +<resources> + + <style name="Theme.SayMyTextsTheme" parent="android:Theme.Material.Settings"> + <item name="android:colorPrimary">@color/green_house</item> + <item name="android:colorPrimaryDark">@color/montana</item> + <item name="android:actionBarStyle">@style/MyActionBarLogo</item> + </style> + + <style name="MyActionBarLogo" parent="android:Widget.Material.Light.ActionBar.Solid"> + <item name="android:logo">@drawable/actionbar_logo</item> + <item name="android:displayOptions">useLogo|showHome|showTitle</item> + </style> + +</resources> \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml new file mode 100644 index 0000000..6a2b598 --- /dev/null +++ b/res/values/colors.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <item name="green_house" type="color">#3c6f42</item> + <item name="montana" type="color">#3a3c3b</item> +</resources> \ No newline at end of file diff --git a/res/values/themes.xml b/res/values/themes.xml index bff51ec..d519997 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -2,17 +2,6 @@ <resources> - <style name="Theme.SayMyTextsTheme" parent="Theme.AppCompat.Light"> - <!-- Here we setting appcompat’s actionBarStyle --> - <!--<item name="actionBarStyle">@style/MyActionBarStyle</item>--> - - <!-- ...and here we setting appcompat’s color theming attrs --> - <item name="colorPrimary">#88FF88</item> - <item name="colorPrimaryDark">#00FF00</item> - <!--<item name="android:windowNoTitle">true</item>--> - <item name="windowActionBar">false</item> - - <!-- The rest of your attributes --> - </style> + <style name="Theme.SayMyTextsTheme" parent="android:Theme.Holo.Light"/> </resources> \ No newline at end of file diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 20cf403..0d8f41b 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -30,12 +30,6 @@ android:entryValues="@array/preferences_notifications_values" android:defaultValue="cancelable"/> - <ListPreference android:key="@string/preference_notifications_key" - android:title="@string/preference_notifications_label" - android:entries="@array/preferences_notifications_entries" - android:entryValues="@array/preferences_notifications_values" - android:defaultValue="cancelable"/> - <Preference android:key="@string/preference_test_sms_key" android:title="@string/preference_test_sms_label" android:persistent="false"/> diff --git a/src/main/java/org/chorem/android/saymytexts/SettingsActivity.java b/src/main/java/org/chorem/android/saymytexts/SettingsActivity.java index f1897f5..5482153 100644 --- a/src/main/java/org/chorem/android/saymytexts/SettingsActivity.java +++ b/src/main/java/org/chorem/android/saymytexts/SettingsActivity.java @@ -24,6 +24,7 @@ package org.chorem.android.saymytexts; * #L% */ +import android.app.Activity; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.ActivityNotFoundException; @@ -40,8 +41,6 @@ import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.preference.SwitchPreference; import android.speech.tts.TextToSpeech; -import android.support.v7.app.ActionBarActivity; -import android.support.v7.widget.Toolbar; import android.telephony.SmsManager; import android.telephony.TelephonyManager; import android.text.InputType; @@ -56,7 +55,7 @@ import org.chorem.android.saymytexts.utils.SayMyTextsUtils; * @author Kevin Morin (Code Lutin) * @since 1.0 */ -public class SettingsActivity extends ActionBarActivity { +public class SettingsActivity extends Activity { private static final String TAG = "SettingsActivity"; @@ -66,12 +65,6 @@ public class SettingsActivity extends ActionBarActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.preferences); - - Toolbar toolbar = (Toolbar) findViewById(R.id.my_toolbar); - setSupportActionBar(toolbar); -// getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getFragmentManager().beginTransaction() .replace(android.R.id.content, new SettingsFragment()) .commit(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.