Commit a6bf3ce7 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Replace old layout

parent d12f0d8b
...@@ -47,6 +47,7 @@ public class MRLPanelFragment extends Fragment implements View.OnKeyListener, Te ...@@ -47,6 +47,7 @@ public class MRLPanelFragment extends Fragment implements View.OnKeyListener, Te
private RecyclerView.LayoutManager mLayoutManager; private RecyclerView.LayoutManager mLayoutManager;
ArrayList<String> mHistory; ArrayList<String> mHistory;
EditText mEditText; EditText mEditText;
View mRootView;
public MRLPanelFragment(){}; public MRLPanelFragment(){};
...@@ -58,6 +59,7 @@ public class MRLPanelFragment extends Fragment implements View.OnKeyListener, Te ...@@ -58,6 +59,7 @@ public class MRLPanelFragment extends Fragment implements View.OnKeyListener, Te
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.open_mrl_dialog_title); ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.open_mrl_dialog_title);
View v = inflater.inflate(R.layout.mrl_panel, container, false); View v = inflater.inflate(R.layout.mrl_panel, container, false);
mRootView = v.findViewById(R.id.mrl_root);
mEditText = (EditText) v.findViewById(R.id.mrl_edit); mEditText = (EditText) v.findViewById(R.id.mrl_edit);
mEditText.setOnKeyListener(this); mEditText.setOnKeyListener(this);
mEditText.setOnEditorActionListener(this); mEditText.setOnEditorActionListener(this);
...@@ -117,11 +119,9 @@ public class MRLPanelFragment extends Fragment implements View.OnKeyListener, Te ...@@ -117,11 +119,9 @@ public class MRLPanelFragment extends Fragment implements View.OnKeyListener, Te
} }
private void focusHelper(boolean idIsEmpty) { private void focusHelper(boolean idIsEmpty) {
View parent = View.inflate(getActivity(),
R.layout.directory_view, null);
MainActivity main = (MainActivity)getActivity(); MainActivity main = (MainActivity)getActivity();
main.setMenuFocusDown(idIsEmpty, R.id.mrl_list); main.setMenuFocusDown(idIsEmpty, R.id.mrl_list);
main.setSearchAsFocusDown(idIsEmpty, parent, R.id.mrl_list); main.setSearchAsFocusDown(idIsEmpty, mRootView, R.id.mrl_list);
} }
public boolean isEmpty(){ public boolean isEmpty(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment