--- /dev/null
+/* Copyright 2020 Braden Farmer
+ *
+ * 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.
+ */
+
+package com.farmerbb.taskbar.activity;
+
+import android.app.Activity;
+import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.os.Bundle;
+import android.os.Handler;
+import android.widget.Toast;
+
+import com.farmerbb.taskbar.R;
+import com.farmerbb.taskbar.util.U;
+
+import java.util.List;
+
+public class HSLActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ SharedPreferences pref = U.getSharedPreferences(this);
+ String activityToLaunch = pref.getString("hsl_id", "null");
+
+ Intent homeIntent = new Intent(Intent.ACTION_MAIN);
+ homeIntent.addCategory(Intent.CATEGORY_HOME);
+ PackageManager manager = getPackageManager();
+ List<ResolveInfo> listOfLaunchers = manager.queryIntentActivities(homeIntent, 0);
+
+ try {
+ manager.getApplicationInfo(activityToLaunch, 0);
+
+ for(ResolveInfo launcher : listOfLaunchers) {
+ if(activityToLaunch.equals("com.google.android.googlequicksearchbox")) {
+ // Only add the Google App onto the list if Google Now Launcher is installed
+ try {
+ manager.getApplicationInfo("com.google.android.launcher", 0);
+ if(activityToLaunch.equals(launcher.activityInfo.packageName))
+ activityToLaunch = activityToLaunch + "/" + launcher.activityInfo.name;
+
+ } catch (PackageManager.NameNotFoundException e) {
+ activityToLaunch = "null";
+ }
+ } else {
+ if(activityToLaunch.equals(launcher.activityInfo.packageName))
+ activityToLaunch = activityToLaunch + "/" + launcher.activityInfo.name;
+ }
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ activityToLaunch = "null";
+ }
+
+ if(activityToLaunch.equals("null")) {
+ launcherNotFound();
+ } else {
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.setComponent(ComponentName.unflattenFromString(activityToLaunch));
+ intent.addCategory(Intent.CATEGORY_HOME);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+
+ try {
+ startActivity(intent);
+
+ // Fire the intent twice to fix launchers that specifically listen
+ // for home button presses (i.e. to jump to the default panel)
+ new Handler().post(() -> startActivity(intent));
+ } catch (ActivityNotFoundException e) {
+ launcherNotFound();
+ }
+ }
+
+ finish();
+ }
+
+ private void launcherNotFound() {
+ SharedPreferences pref = U.getSharedPreferences(this);
+ if(!pref.getString("hsl_name", "null").equals("null")) {
+ U.showToast(this, getString(R.string.tb_hsl_launcher_uninstalled, pref.getString("hsl_name", "null")), Toast.LENGTH_LONG);
+ }
+
+ Intent intent = new Intent(this, HSLConfigActivity.class);
+ startActivity(intent);
+ }
+}
--- /dev/null
+/* Copyright 2020 Braden Farmer
+ *
+ * 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.
+ */
+
+package com.farmerbb.taskbar.activity;
+
+import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+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.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.farmerbb.taskbar.R;
+import com.farmerbb.taskbar.util.U;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class HSLConfigActivity extends AppCompatActivity {
+
+ private boolean returnToSettings;
+
+ private final class LauncherListAdapter extends ArrayAdapter<String> {
+ private LauncherListAdapter(Context context, ArrayList<String> notes) {
+ super(context, R.layout.tb_hsl_row_layout, notes);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ // Get the data item for this position
+ String launcher = getItem(position);
+ // Check if an existing view is being reused, otherwise inflate the view
+ if(convertView == null) {
+ convertView = LayoutInflater.from(getContext()).inflate(R.layout.tb_hsl_row_layout, parent, false);
+ }
+ // Lookup view for data population
+ TextView launcherTitle = (TextView) convertView.findViewById(R.id.launcherTitle);
+ // Populate the data into the template view using the data object
+ launcherTitle.setText(launcher);
+
+ // Return the completed view to render on screen
+ return convertView;
+ }
+ }
+
+ ArrayList<String> packageIds;
+ ArrayList<String> packageNames;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.tb_activity_hsl_config);
+
+ // Make action bar invisible
+ if(getSupportActionBar() != null)
+ getSupportActionBar().setElevation(0);
+
+ setTitle(null);
+
+ returnToSettings = getIntent().getBooleanExtra("return_to_settings", false);
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
+ packageIds = new ArrayList<>();
+ packageNames = new ArrayList<>();
+
+ // Get list of currently installed launchers
+ Intent homeIntent = new Intent(Intent.ACTION_MAIN);
+ homeIntent.addCategory(Intent.CATEGORY_HOME);
+ PackageManager manager = getPackageManager();
+ final List<ResolveInfo> listOfLaunchers = manager.queryIntentActivities(homeIntent, 0);
+
+ for(ResolveInfo launcher : listOfLaunchers) {
+ String string = launcher.activityInfo.packageName;
+
+ // Don't include the Settings dummy launcher, or Taskbar itself, on the list
+ if(!string.equals("com.android.settings")
+ && !string.equals("com.android.tv.settings")
+ && !string.startsWith("com.farmerbb.taskbar")) {
+ if(string.equals("com.google.android.googlequicksearchbox")) {
+ // Only add the Google App onto the list if Google Now Launcher is installed
+ try {
+ packageNames.add(manager.getApplicationInfo("com.google.android.launcher", 0).loadLabel(manager).toString());
+ packageIds.add(string);
+ } catch (PackageManager.NameNotFoundException e) { /* Gracefully fail */ }
+ } else {
+ packageNames.add(launcher.activityInfo.applicationInfo.loadLabel(manager).toString());
+ packageIds.add(string);
+ }
+ }
+ }
+
+ ListView listView = (ListView) findViewById(R.id.listView);
+ TextView textView = (TextView) findViewById(R.id.textView);
+
+ // Display the list of launchers
+ if(packageNames.size() > 0) {
+ textView.setText(R.string.tb_hsl_main_activity_text);
+
+ // Create the custom adapter to bind the array to the ListView
+ final LauncherListAdapter adapter = new LauncherListAdapter(this, packageNames);
+
+ // Display the ListView
+ listView.setAdapter(adapter);
+ listView.setClickable(true);
+ listView.setOnItemClickListener((arg0, arg1, position, arg3) -> {
+ SharedPreferences pref = U.getSharedPreferences(HSLConfigActivity.this);
+ SharedPreferences.Editor editor = pref.edit();
+ editor.putString("hsl_id", packageIds.get(position));
+ editor.putString("hsl_name", packageNames.get(position));
+ editor.apply();
+
+ for(ResolveInfo launcher : listOfLaunchers) {
+ if(packageIds.get(position).equals(launcher.activityInfo.packageName)) {
+ if(!returnToSettings) {
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.setComponent(ComponentName.unflattenFromString(packageIds.get(position) + "/" + launcher.activityInfo.name));
+ intent.addCategory(Intent.CATEGORY_HOME);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+
+ try {
+ startActivity(intent);
+ } catch (ActivityNotFoundException e) { /* Gracefully fail */ }
+ }
+
+ finish();
+ }
+ }
+ });
+ } else
+ textView.setText(R.string.tb_hsl_no_launchers_found);
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate action bar menu
+ if(!returnToSettings) getMenuInflater().inflate(R.menu.tb_hsl_config, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle presses on the action bar items
+
+ if(item.getItemId() == R.id.action_settings) {
+ Intent intent = new Intent(this, MainActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+
+ return true;
+ }
+
+ @Override
+ public void onBackPressed() {
+ if(returnToSettings) super.onBackPressed();
+ }
+}
boolean launcherEnabled = (pref.getBoolean("launcher", false) && U.canDrawOverlays(this))
|| U.isLauncherPermanentlyEnabled(this);
+ boolean desktopModeEnabled = U.isDesktopModeSupported(this)
+ && pref.getBoolean("desktop_mode", false);
+
editor.putBoolean("launcher", launcherEnabled);
+ editor.putBoolean("desktop_mode", desktopModeEnabled);
editor.apply();
if(!U.isLibrary(this)) {
ComponentName component5 = new ComponentName(this, SecondaryHomeActivity.class);
getPackageManager().setComponentEnabledSetting(component5,
- U.isDesktopModeSupported(this)
+ desktopModeEnabled
+ ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+ : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
+ PackageManager.DONT_KILL_APP);
+
+ ComponentName component6 = new ComponentName(this, HSLActivity.class);
+ getPackageManager().setComponentEnabledSetting(component6,
+ desktopModeEnabled
? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
- ComponentName component6 = new ComponentName(this, KeyboardShortcutActivityLockDevice.class);
- getPackageManager().setComponentEnabledSetting(component6,
+ ComponentName component7 = new ComponentName(this, KeyboardShortcutActivityLockDevice.class);
+ getPackageManager().setComponentEnabledSetting(component7,
pref.getBoolean("keyboard_shortcut", false)
? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
package com.farmerbb.taskbar.fragment;
import android.annotation.TargetApi;
-import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
import android.os.Bundle;
+import android.preference.CheckBoxPreference;
import android.preference.Preference;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import com.farmerbb.taskbar.R;
+import com.farmerbb.taskbar.activity.HSLActivity;
+import com.farmerbb.taskbar.activity.HSLConfigActivity;
+import com.farmerbb.taskbar.activity.SecondaryHomeActivity;
import com.farmerbb.taskbar.util.U;
public class DesktopModeFragment extends SettingsFragment {
addPreferencesFromResource(R.xml.tb_pref_desktop_mode);
// Set OnClickListeners for certain preferences
- findPreference("set_as_default").setOnPreferenceClickListener(this);
+ findPreference("desktop_mode").setOnPreferenceClickListener(this);
+ findPreference("primary_launcher").setOnPreferenceClickListener(this);
SharedPreferences pref = U.getSharedPreferences(getActivity());
if(pref.getBoolean("launcher", false))
actionBar.setDisplayHomeAsUpEnabled(true);
}
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ Preference primaryLauncherPref = findPreference("primary_launcher");
+ if(primaryLauncherPref != null) {
+ SharedPreferences pref = U.getSharedPreferences(getActivity());
+ String primaryLauncherName = pref.getString("hsl_name", "null");
+
+ primaryLauncherPref.setSummary(primaryLauncherName.equals("null")
+ ? getString(R.string.tb_icon_pack_none)
+ : primaryLauncherName
+ );
+ }
+ }
+
@TargetApi(29)
@Override
public boolean onPreferenceClick(final Preference p) {
- final SharedPreferences pref = U.getSharedPreferences(getActivity());
-
switch(p.getKey()) {
- case "set_as_default":
- Intent intent = new Intent();
- intent.setAction(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_SECONDARY_HOME);
-
- try {
- startActivity(intent);
- } catch (Exception e) { /* Gracefully fail */ }
+ case "desktop_mode":
+ ComponentName component = new ComponentName(getActivity(), SecondaryHomeActivity.class);
+ getActivity().getPackageManager().setComponentEnabledSetting(component,
+ ((CheckBoxPreference) p).isChecked()
+ ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+ : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
+ PackageManager.DONT_KILL_APP);
+
+ ComponentName component2 = new ComponentName(getActivity(), HSLActivity.class);
+ getActivity().getPackageManager().setComponentEnabledSetting(component2,
+ ((CheckBoxPreference) p).isChecked()
+ ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+ : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
+ PackageManager.DONT_KILL_APP);
+
+ break;
+ case "primary_launcher":
+ Intent intent = new Intent(getActivity(), HSLConfigActivity.class);
+ intent.putExtra("return_to_settings", true);
+ startActivity(intent);
break;
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Copyright 2020 Braden Farmer\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+\r
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
+ android:orientation="vertical" android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:gravity="center" >\r
+\r
+ <TextView\r
+ android:layout_width="@dimen/tb_match_parent"\r
+ android:layout_height="wrap_content"\r
+ android:padding="32dp"\r
+ android:textSize="20sp"\r
+ android:gravity="center"\r
+ android:id="@+id/textView"/>\r
+\r
+ <ListView\r
+ android:layout_width="@dimen/tb_match_parent"\r
+ android:layout_height="wrap_content"\r
+ android:id="@+id/listView" />\r
+\r
+ <Space\r
+ android:layout_width="match_parent"\r
+ android:layout_height="48dp" />\r
+\r
+</LinearLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Copyright 2020 Braden Farmer\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+\r
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent" >\r
+\r
+ <TextView\r
+ android:id="@+id/launcherTitle"\r
+ android:layout_width="0dp"\r
+ android:layout_height="match_parent"\r
+ android:layout_weight="1"\r
+ android:ellipsize="end"\r
+ android:gravity="center"\r
+ android:maxLines="1"\r
+ android:paddingBottom="10dp"\r
+ android:paddingLeft="5dp"\r
+ android:paddingTop="10dp"\r
+ android:paddingRight="5dp"\r
+ android:text="@null"\r
+ android:textSize="25sp"\r
+ android:textStyle="bold" />\r
+\r
+</LinearLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Copyright 2020 Braden Farmer\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+\r
+<menu xmlns:android="http://schemas.android.com/apk/res/android"\r
+ xmlns:app="http://schemas.android.com/apk/res-auto">\r
+\r
+ <item\r
+ android:id="@+id/action_settings"\r
+ android:icon="@drawable/tb_settings"\r
+ android:title="@string/tb_settings"\r
+ app:showAsAction="ifRoom" />\r
+ \r
+</menu>\r
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
\ No newline at end of file
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
\ No newline at end of file
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
\ No newline at end of file
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
\ No newline at end of file
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No third-party launchers were found.\n\nPlease download and install one, then re-open this application.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below.\n\nYou can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
\ No newline at end of file
<color name="tb_desktop_icon_text">#FFFFFF</color>
<color name="tb_desktop_icon_shadow">#000000</color>
+
+ <color name="tb_hsl_primary">#0277BD</color>
+ <color name="tb_hsl_background">#012C4E</color>
+ <color name="tb_hsl_button">#C1C1C1</color>
+
</resources>
<string name="tb_restoring_settings">Restoring settings…</string>
<string name="tb_pref_header_desktop_mode">Desktop mode</string>
+ <string name="tb_primary_launcher">Primary launcher</string>
+
+ <string name="tb_hsl_no_launchers_found">No primary launchers were found. Please download and install one, then try again.</string>
+ <string name="tb_hsl_launcher_uninstalled">%1$s was uninstalled. Please select a different launcher from the list.</string>
+ <string name="tb_hsl_main_activity_text">Select your primary launcher from the list below. You can change this selection at any time from within Taskbar\'s desktop mode settings.</string>
</resources>
<item name="android:colorAccent">@color/tb_colorAccent</item>
</style>
+ <style name="Taskbar.HSLConfigActivity" parent="Theme.AppCompat">
+ <item name="colorPrimary">@color/tb_hsl_background</item>
+ <item name="android:windowBackground">@color/tb_hsl_background</item>
+ <item name="tb_settings_icon_color">@color/tb_settings_icon_color_dark</item>
+ </style>
+
</resources>
\ No newline at end of file
android:title="@string/tb_pref_header_desktop_mode"/>
<Preference
- android:key="set_as_default"
- android:title="Set as default"/>
+ android:key="primary_launcher"
+ android:title="@string/tb_primary_launcher"
+ android:dependency="desktop_mode"/>
<PreferenceCategory android:key="dummy" android:title="\n\n" />
<activity
android:name=".activity.BackupRestoreActivity"
android:theme="@style/Taskbar.Dialog"/>
+ <activity
+ android:name=".activity.HSLActivity"
+ android:label="${appName}"
+ android:launchMode="singleTask"
+ android:enabled="false"
+ android:theme="@android:style/Theme.NoDisplay">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.HOME"/>
+ </intent-filter>
+ </activity>
+ <activity
+ android:name=".activity.HSLConfigActivity"
+ android:label="${appName}"
+ android:launchMode="singleTask"
+ android:theme="@style/Taskbar.HSLConfigActivity"/>
<service android:name=".service.TaskbarService"/>
<service android:name=".service.StartMenuService"/>