applicationId "com.farmerbb.taskbar"
minSdkVersion 21
targetSdkVersion 24
- versionCode 33
+ versionCode 34
versionName "1.1.5"
}
buildTypes {
release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ minifyEnabled true
+ shrinkResources true
+ proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile "com.android.support:support-v4:${SUPPORT_LIBRARY_VERSION}"
+ compile "com.android.support:appcompat-v7:${SUPPORT_LIBRARY_VERSION}"
}
+++ /dev/null
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /Users/braden/Library/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 *;
-#}
package com.farmerbb.taskbar;
import android.annotation.TargetApi;
-import android.app.ActionBar;
-import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.content.ComponentName;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
import android.view.Display;
import android.widget.CompoundButton;
import android.widget.Switch;
import com.farmerbb.taskbar.service.TaskbarService;
import com.farmerbb.taskbar.util.U;
-public class MainActivity extends Activity {
+public class MainActivity extends AppCompatActivity {
private Switch theSwitch;
setContentView(R.layout.main);
- ActionBar actionBar = getActionBar();
+ ActionBar actionBar = getSupportActionBar();
if(actionBar != null) {
actionBar.setCustomView(R.layout.switch_layout);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
import android.os.IBinder;
import android.provider.Settings;
import android.support.v4.content.LocalBroadcastManager;
+import android.support.v7.widget.SearchView;
+import android.view.ContextThemeWrapper;
import android.view.Display;
import android.view.Gravity;
+import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
-import android.widget.SearchView;
import android.widget.TextView;
import com.farmerbb.taskbar.R;
}
// Initialize views
- layout = (LinearLayout) View.inflate(this, layoutId, null);
+ ContextThemeWrapper wrapper = new ContextThemeWrapper(this, R.style.AppTheme);
+ layout = (LinearLayout) LayoutInflater.from(wrapper).inflate(layoutId, null);
startMenu = (ThemedGridView) layout.findViewById(R.id.start_menu);
boolean scrollbar = pref.getBoolean("scrollbar", false);
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY, query);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if(intent.resolveActivity(getPackageManager()) != null)
startActivity(intent);
else {
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/start_menu_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:clickable="true"
- android:visibility="gone" >
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/start_menu_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:clickable="true"
+ android:visibility="gone">
<FrameLayout
android:layout_width="wrap_content"
android:paddingBottom="1dp"
android:background="@color/translucent_gray" >
- <SearchView
+ <android.support.v7.widget.SearchView
android:id="@+id/search"
android:layout_width="@dimen/start_menu_width"
android:layout_height="wrap_content"
android:background="@android:color/white"
- android:queryBackground="@android:color/transparent"
- android:iconifiedByDefault="false" />
+ app:queryBackground="@android:color/transparent"
+ app:iconifiedByDefault="false" />
</FrameLayout>
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/start_menu_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:clickable="true"
- android:visibility="gone" >
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/start_menu_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:clickable="true"
+ android:visibility="gone">
<FrameLayout
android:layout_width="wrap_content"
android:paddingBottom="1dp"
android:background="@color/translucent_gray" >
- <SearchView
+ <android.support.v7.widget.SearchView
android:id="@+id/search"
android:layout_width="@dimen/start_menu_width"
android:layout_height="wrap_content"
android:background="@android:color/white"
- android:queryBackground="@android:color/transparent"
- android:iconifiedByDefault="false" />
+ app:queryBackground="@android:color/transparent"
+ app:iconifiedByDefault="false" />
</FrameLayout>
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/start_menu_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:clickable="true"
- android:visibility="gone" >
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/start_menu_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:clickable="true"
+ android:visibility="gone">
<FrameLayout
android:layout_width="wrap_content"
android:background="@color/translucent_gray"
android:layout_marginLeft="@dimen/icon_size" >
- <SearchView
+ <android.support.v7.widget.SearchView
android:id="@+id/search"
android:layout_width="@dimen/start_menu_width"
android:layout_height="wrap_content"
android:background="@android:color/white"
- android:queryBackground="@android:color/transparent"
- android:iconifiedByDefault="false" />
+ app:queryBackground="@android:color/transparent"
+ app:iconifiedByDefault="false" />
</FrameLayout>
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/start_menu_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:clickable="true"
- android:visibility="gone" >
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/start_menu_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:clickable="true"
+ android:visibility="gone">
<FrameLayout
android:layout_width="wrap_content"
android:background="@color/translucent_gray"
android:layout_marginRight="@dimen/icon_size" >
- <SearchView
+ <android.support.v7.widget.SearchView
android:id="@+id/search"
android:layout_width="@dimen/start_menu_width"
android:layout_height="wrap_content"
android:background="@android:color/white"
- android:queryBackground="@android:color/transparent"
- android:iconifiedByDefault="false" />
+ app:queryBackground="@android:color/transparent"
+ app:iconifiedByDefault="false" />
</FrameLayout>
<resources>
- <style name="AppTheme" parent="@android:style/Theme.Material.Light.DarkActionBar">
- <item name="android:colorPrimary">@color/colorPrimary</item>
- <item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
- <item name="android:colorAccent">@color/colorAccent</item>
+ <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <item name="colorPrimary">@color/colorPrimary</item>
+ <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+ <item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.HomeActivity" parent="@android:style/Theme.Material.Wallpaper.NoTitleBar"/>