Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
162f42bf
Commit
162f42bf
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Do not set theme of MRL fragment
It breaks display on ChromeOS (cherry picked from commit
652eeac3
)
parent
f26c05fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
+9
-13
9 additions, 13 deletions
...id/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
with
9 additions
and
13 deletions
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
+
9
−
13
View file @
162f42bf
...
...
@@ -53,10 +53,9 @@ public class MRLPanelFragment extends DialogFragment implements View.OnKeyListen
public
MRLPanelFragment
(){}
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
int
theme
=
UiTools
.
isBlackThemeEnabled
()
?
R
.
style
.
Theme_VLC_Black
:
R
.
style
.
Theme_VLC
;
setStyle
(
DialogFragment
.
STYLE_NO_FRAME
,
theme
);
View
v
=
inflater
.
inflate
(
R
.
layout
.
mrl_panel
,
container
,
false
);
mEditText
=
(
TextInputLayout
)
v
.
findViewById
(
R
.
id
.
mrl_edit
);
setStyle
(
DialogFragment
.
STYLE_NO_FRAME
,
0
);
final
View
v
=
inflater
.
inflate
(
R
.
layout
.
mrl_panel
,
container
,
false
);
mEditText
=
v
.
findViewById
(
R
.
id
.
mrl_edit
);
mEditText
.
getEditText
().
setOnKeyListener
(
this
);
mEditText
.
getEditText
().
setOnEditorActionListener
(
this
);
mEditText
.
setHint
(
getString
(
R
.
string
.
open_mrl_dialog_msg
));
...
...
@@ -84,11 +83,9 @@ public class MRLPanelFragment extends DialogFragment implements View.OnKeyListen
@Override
public
void
onViewStateRestored
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onViewStateRestored
(
savedInstanceState
);
if
(
savedInstanceState
==
null
||
mEditText
==
null
)
return
;
String
mrl
=
savedInstanceState
.
getString
(
KEY_MRL
);
if
(
mEditText
!=
null
&&
mEditText
.
getEditText
()
!=
null
)
mEditText
.
getEditText
().
setText
(
mrl
);
if
(
savedInstanceState
==
null
||
mEditText
==
null
)
return
;
final
String
mrl
=
savedInstanceState
.
getString
(
KEY_MRL
);
if
(
mEditText
!=
null
&&
mEditText
.
getEditText
()
!=
null
)
mEditText
.
getEditText
().
setText
(
mrl
);
}
private
void
updateHistory
()
{
...
...
@@ -106,7 +103,7 @@ public class MRLPanelFragment extends DialogFragment implements View.OnKeyListen
private
boolean
processUri
()
{
if
(
mEditText
.
getEditText
()
!=
null
&&
!
TextUtils
.
isEmpty
(
mEditText
.
getEditText
().
getText
()))
{
MediaWrapper
mw
=
new
MediaWrapper
(
Uri
.
parse
(
mEditText
.
getEditText
().
getText
().
toString
().
trim
()));
final
MediaWrapper
mw
=
new
MediaWrapper
(
Uri
.
parse
(
mEditText
.
getEditText
().
getText
().
toString
().
trim
()));
playMedia
(
mw
);
mEditText
.
getEditText
().
getText
().
clear
();
return
true
;
...
...
@@ -140,8 +137,7 @@ public class MRLPanelFragment extends DialogFragment implements View.OnKeyListen
@Override
public
void
onDestroy
()
{
super
.
onDestroy
();
Activity
activity
=
getActivity
();
if
(
activity
!=
null
&&
activity
instanceof
DialogActivity
)
activity
.
finish
();
final
Activity
activity
=
getActivity
();
if
(
activity
instanceof
DialogActivity
)
activity
.
finish
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment