ComponentName.unflattenFromString(entry.getComponentName()),
userManager.getUserForSerialNumber(entry.getUserId(this)),
null,
- U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, null)));
+ U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, getListView().getChildAt(p.getOrder()))));
showStartMenu = false;
shouldHideTaskbar = true;
intent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
try {
- startActivity(intent2, U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, null));
+ startActivity(intent2,
+ U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, getListView().getChildAt(p.getOrder())));
} catch (IllegalArgumentException e) { /* Gracefully fail */ }
});
SavedWindowSizes.getInstance(this).setWindowSize(this, entry.getPackageName(), windowSize);
}
- U.launchApp(getApplicationContext(), entry, windowSize, false, true, null);
+ U.launchApp(
+ getApplicationContext(),
+ entry,
+ windowSize,
+ false,
+ true,
+ getListView().getChildAt(p.getOrder()));
if(U.hasBrokenSetLaunchBoundsApi())
U.cancelToast();
case "shortcut_3":
case "shortcut_4":
case "shortcut_5":
- U.startShortcut(getApplicationContext(), entry, shortcuts.get(Integer.parseInt(p.getKey().replace("shortcut_", "")) - 1));
+ U.startShortcut(
+ getApplicationContext(),
+ entry,
+ shortcuts.get(Integer.parseInt(p.getKey().replace("shortcut_", "")) - 1),
+ getListView().getChildAt(p.getOrder()));
showStartMenu = false;
shouldHideTaskbar = true;
fileManagerIntent.setData(Uri.parse("content://com.android.externalstorage.documents/root/primary"));
try {
- startActivity(fileManagerIntent, U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, null));
+ startActivity(fileManagerIntent,
+ U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, getListView().getChildAt(p.getOrder())));
} catch (ActivityNotFoundException e) {
U.showToast(this, R.string.lock_device_not_supported);
} catch (IllegalArgumentException e) { /* Gracefully fail */ }
settingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
- startActivity(settingsIntent, U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, null));
+ startActivity(settingsIntent,
+ U.getActivityOptionsBundle(this, ApplicationType.APPLICATION, getListView().getChildAt(p.getOrder())));
} catch (ActivityNotFoundException e) {
U.showToast(this, R.string.lock_device_not_supported);
} catch (IllegalArgumentException e) { /* Gracefully fail */ }
LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.SORT_DESKTOP_ICONS"));
break;
case "change_wallpaper":
+ if(LauncherHelper.getInstance().isOnHomeScreen())
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
+
Intent intent3 = Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER), getString(R.string.set_wallpaper));
intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
U.startActivityMaximized(getApplicationContext(), intent3);
getWindow().setElevation(0);
}
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
+
progressBar = findViewById(R.id.progress_bar);
appList = findViewById(R.id.list);
if(appListGenerator != null && appListGenerator.getStatus() == AsyncTask.Status.RUNNING)
appListGenerator.cancel(true);
+ if(!U.shouldCollapse(this, false))
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_SHOW_TASKBAR"));
+
super.finish();
}
protected void onPostExecute(DesktopIconAppListAdapter adapter) {
progressBar.setVisibility(View.GONE);
appList.setAdapter(adapter);
+ setFinishOnTouchOutside(true);
}
}
}
\ No newline at end of file
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.LauncherApps;
+import android.content.res.ColorStateList;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.LocalBroadcastManager;
+import android.support.v4.graphics.ColorUtils;
import android.support.v7.app.AppCompatActivity;
import android.util.SparseArray;
import android.view.DragEvent;
}
};
- if(U.isDesktopIconsEnabled(HomeActivityDelegate.this)) {
+ if(U.isDesktopIconsEnabled(this)) {
layout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
initDesktopIcons();
}
});
- }
-
- if(!U.isDesktopIconsEnabled(this)) {
+ } else {
layout.setOnClickListener(view1 -> LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.HIDE_START_MENU")));
layout.setOnLongClickListener(view2 -> {
}
private void setWallpaper() {
- if(U.shouldCollapse(this, true))
- LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
- else
- LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.HIDE_START_MENU"));
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
try {
startActivity(Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER), getString(R.string.set_wallpaper)));
SharedPreferences pref = U.getSharedPreferences(this);
if(!U.canBootToFreeform(this)) {
LauncherHelper.getInstance().setOnHomeScreen(false);
-
- if(U.shouldCollapse(this, true))
- LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
- else
- LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.HIDE_START_MENU"));
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
if(FeatureFlags.homeActivityUIHost()) {
if(taskbarController != null) taskbarController.onDestroyHost(this);
refreshDesktopIcons();
fab.setImageResource(R.drawable.ic_done_black_24dp);
- fab.setBackgroundColor(U.getAccentColor(this));
+ fab.setBackgroundTintList(
+ ColorStateList.valueOf(ColorUtils.setAlphaComponent(U.getAccentColor(this), 255)));
+
fab.setOnClickListener(v -> {
iconArrangeMode = false;
fab.hide();
TextView textView = icon.findViewById(R.id.name);
textView.setText(entry.getLabel());
textView.setTextColor(ContextCompat.getColor(this, R.color.desktop_icon_text));
- textView.setShadowLayer(50, 0, 0, R.color.desktop_icon_shadow);
+ textView.setShadowLayer(10, 0, 0, R.color.desktop_icon_shadow);
ImageView imageView = icon.findViewById(R.id.icon);
imageView.setImageDrawable(entry.getIcon(this));
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
+import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
getWindow().setElevation(0);
}
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_HIDE_TASKBAR"));
+
progressBar = findViewById(R.id.progress_bar);
appListGenerator = new AppListGenerator();
appListGenerator.execute();
if(appListGenerator != null && appListGenerator.getStatus() == AsyncTask.Status.RUNNING)
appListGenerator.cancel(true);
+ if(!U.shouldCollapse(this, false))
+ LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.TEMP_SHOW_TASKBAR"));
+
super.finish();
}
if(toast != null) toast.cancel();
}
- public static void startShortcut(Context context, AppEntry entry, ShortcutInfo shortcut) {
+ public static void startShortcut(Context context, AppEntry entry, ShortcutInfo shortcut, View view) {
launchApp(context,
entry,
null,
false,
false,
shortcut,
- null);
+ view);
}
public static void launchApp(final Context context,