[Android] Fix streams dialog layout
Geoffrey Métais
git at videolan.org
Thu Jul 12 17:27:48 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul 12 17:12:46 2018 +0200| [a0140230230b39968a404c7e797b03ba7128096c] | committer: Geoffrey Métais
Fix streams dialog layout
> https://code.videolan.org/videolan/vlc-android/commit/a0140230230b39968a404c7e797b03ba7128096c
---
.../src/org/videolan/vlc/gui/network/MRLPanelFragment.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
index cf78a111c..f0b036940 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
@@ -50,21 +50,25 @@ public class MRLPanelFragment extends DialogFragment implements View.OnKeyListen
private MRLAdapter mAdapter;
private TextInputLayout mEditText;
- public MRLPanelFragment(){}
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setStyle(DialogFragment.STYLE_NO_FRAME, 0);
+ }
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- 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));
- RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.mrl_list);
+ final RecyclerView recyclerView = v.findViewById(R.id.mrl_list);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mAdapter = new MRLAdapter(this);
recyclerView.setAdapter(mAdapter);
v.findViewById(R.id.send).setOnClickListener(this);
+ getDialog().setTitle(R.string.open_mrl_dialog_title);
return v;
}
More information about the Android
mailing list