Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
3adc7ca2
Commit
3adc7ca2
authored
Sep 26, 2016
by
d8ahazard
Committed by
topjohnwu
Sep 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix snackbar position
parent
441e603b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ModulesFragment.java
app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java
+7
-5
No files found.
app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java
View file @
3adc7ca2
...
@@ -40,11 +40,12 @@ public class ModulesFragment extends Fragment {
...
@@ -40,11 +40,12 @@ public class ModulesFragment extends Fragment {
private
SharedPreferences
prefs
;
private
SharedPreferences
prefs
;
public
static
List
<
Module
>
listModules
=
new
ArrayList
<>();
public
static
List
<
Module
>
listModules
=
new
ArrayList
<>();
private
View
viewMain
;
@Nullable
@Nullable
@Override
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
public
View
onCreateView
(
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
View
viewMain
=
inflater
.
inflate
(
R
.
layout
.
modules_fragment
,
container
,
false
);
viewMain
=
inflater
.
inflate
(
R
.
layout
.
modules_fragment
,
container
,
false
);
ButterKnife
.
bind
(
this
,
viewMain
);
ButterKnife
.
bind
(
this
,
viewMain
);
mSwipeRefreshLayout
.
setRefreshing
(
true
);
mSwipeRefreshLayout
.
setRefreshing
(
true
);
...
@@ -96,6 +97,7 @@ public class ModulesFragment extends Fragment {
...
@@ -96,6 +97,7 @@ public class ModulesFragment extends Fragment {
@Override
@Override
public
void
onResume
()
{
public
void
onResume
()
{
super
.
onResume
();
super
.
onResume
();
viewMain
=
this
.
getView
();
getActivity
().
setTitle
(
"Modules"
);
getActivity
().
setTitle
(
"Modules"
);
}
}
...
@@ -123,19 +125,19 @@ public class ModulesFragment extends Fragment {
...
@@ -123,19 +125,19 @@ public class ModulesFragment extends Fragment {
if
(!
chbox
.
isChecked
())
{
if
(!
chbox
.
isChecked
())
{
listModules
.
get
(
position
).
createDisableFile
();
listModules
.
get
(
position
).
createDisableFile
();
Snackbar
.
make
(
chk
,
R
.
string
.
disable_file_created
,
Snackbar
.
LENGTH_SHORT
).
show
();
Snackbar
.
make
(
viewMain
,
R
.
string
.
disable_file_created
,
Snackbar
.
LENGTH_SHORT
).
show
();
}
else
{
}
else
{
listModules
.
get
(
position
).
removeDisableFile
();
listModules
.
get
(
position
).
removeDisableFile
();
Snackbar
.
make
(
chk
,
R
.
string
.
disable_file_removed
,
Snackbar
.
LENGTH_SHORT
).
show
();
Snackbar
.
make
(
viewMain
,
R
.
string
.
disable_file_removed
,
Snackbar
.
LENGTH_SHORT
).
show
();
}
}
},
(
deleteBtn
,
position
)
->
{
},
(
deleteBtn
,
position
)
->
{
// On delete button click listener
// On delete button click listener
listModules
.
get
(
position
).
createRemoveFile
();
listModules
.
get
(
position
).
createRemoveFile
();
Snackbar
.
make
(
deleteBt
n
,
R
.
string
.
remove_file_created
,
Snackbar
.
LENGTH_SHORT
).
show
();
Snackbar
.
make
(
viewMai
n
,
R
.
string
.
remove_file_created
,
Snackbar
.
LENGTH_SHORT
).
show
();
},
(
undeleteBtn
,
position
)
->
{
},
(
undeleteBtn
,
position
)
->
{
// On undelete button click listener
// On undelete button click listener
listModules
.
get
(
position
).
deleteRemoveFile
();
listModules
.
get
(
position
).
deleteRemoveFile
();
Snackbar
.
make
(
undeleteBt
n
,
R
.
string
.
remove_file_deleted
,
Snackbar
.
LENGTH_SHORT
).
show
();
Snackbar
.
make
(
viewMai
n
,
R
.
string
.
remove_file_deleted
,
Snackbar
.
LENGTH_SHORT
).
show
();
}));
}));
mSwipeRefreshLayout
.
setRefreshing
(
false
);
mSwipeRefreshLayout
.
setRefreshing
(
false
);
...
...
Write
Preview
Markdown
is supported
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