Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
BlissLauncher
Commits
246b31d8
Commit
246b31d8
authored
Jun 02, 2020
by
Amit Kumar
💻
Browse files
Merge branch 'issue-1233' into master
parents
d9b1ef45
5ba7ddf0
Pipeline
#56722
failed with stage
in 3 minutes and 17 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java
View file @
246b31d8
...
...
@@ -18,6 +18,7 @@ import android.content.ComponentName;
import
android.content.ContentResolver
;
import
android.content.Context
;
import
android.content.ContextWrapper
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.content.pm.LauncherApps
;
...
...
@@ -39,6 +40,8 @@ import android.os.UserManager;
import
android.provider.Settings
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.util.Log
;
import
android.view.ContextThemeWrapper
;
import
android.view.DragEvent
;
import
android.view.Gravity
;
import
android.view.LayoutInflater
;
...
...
@@ -1976,8 +1979,21 @@ public class LauncherActivity extends AppCompatActivity implements
startActivity
(
i
);
}
}
else
if
(
launcherItem
.
itemType
==
Constants
.
ITEM_TYPE_SHORTCUT
)
{
DeepShortcutManager
.
getInstance
(
this
).
unpinShortcut
(
ShortcutKey
.
fromItem
((
ShortcutItem
)
launcherItem
));
removeShortcutView
((
ShortcutItem
)
launcherItem
,
blissFrameLayout
);
AlertDialog
dialog
=
new
AlertDialog
.
Builder
(
new
ContextThemeWrapper
(
this
,
R
.
style
.
AlertDialogCustom
))
.
setTitle
(
launcherItem
.
title
)
.
setMessage
(
R
.
string
.
uninstall_shortcut_dialog
)
.
setPositiveButton
(
R
.
string
.
ok
,
(
dialog1
,
which
)
->
{
DeepShortcutManager
.
getInstance
(
this
).
unpinShortcut
(
ShortcutKey
.
fromItem
((
ShortcutItem
)
launcherItem
));
removeShortcutView
((
ShortcutItem
)
launcherItem
,
blissFrameLayout
);
})
.
setNegativeButton
(
R
.
string
.
cancel
,
null
)
.
setIcon
(
launcherItem
.
icon
)
.
create
();
dialog
.
setOnShowListener
(
arg0
->
{
dialog
.
getButton
(
AlertDialog
.
BUTTON_POSITIVE
).
setTextColor
(
getResources
().
getColor
(
R
.
color
.
color_blue
));
dialog
.
getButton
(
AlertDialog
.
BUTTON_NEGATIVE
).
setTextColor
(
getResources
().
getColor
(
R
.
color
.
color_blue
));
});
dialog
.
show
();
}
});
FrameLayout
.
LayoutParams
layoutParams
=
new
FrameLayout
.
LayoutParams
(
...
...
app/src/main/res/values/colors.xml
View file @
246b31d8
...
...
@@ -19,4 +19,6 @@
<color
name=
"list_selector_focused"
>
#cc33b5e5
</color>
<color
name=
"list_selector_activated"
>
#4d33b5e5
</color>
<color
name=
"white"
>
#FFFFFF
</color>
<color
name=
"color_blue"
>
#0088ED
</color>
</resources>
app/src/main/res/values/strings.xml
View file @
246b31d8
...
...
@@ -174,5 +174,6 @@
<string
name=
"add_widget"
>
Add Widget
</string>
<string
name=
"edit"
>
Edit
</string>
<string
name=
"widgets"
>
Widgets
</string>
<string
name=
"uninstall_shortcut_dialog"
>
Do you want to uninstall this shortcut?
</string>
<string
name=
"ok"
>
ok
</string>
</resources>
app/src/main/res/values/styles.xml
View file @
246b31d8
...
...
@@ -26,4 +26,10 @@
<item
name=
"android:windowNoTitle"
>
false
</item>
<item
name=
"android:listDivider"
>
@drawable/list_divider_material
</item>
</style>
<style
name=
"AlertDialogCustom"
parent=
"Theme.AppCompat.Light.Dialog"
>
<item
name=
"android:textColor"
>
#000000
</item>
<item
name=
"android:typeface"
>
normal
</item>
<item
name=
"android:background"
>
@color/white
</item>
</style>
</resources>
Amit Kumar
💻
@amitkumar
mentioned in merge request
!43 (closed)
·
Jun 02, 2020
mentioned in merge request
!43 (closed)
mentioned in merge request !43
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment