This commit is contained in:
PeratX 2017-11-12 09:48:31 +08:00
parent 4a4df71d13
commit c98f8875f6
5 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,5 @@
iTXTech Daedalus
===============
__热烈庆祝中国共产党第十九次全国代表大会胜利召开__
__No root required Android DNS modifier and Hosts/DNSMasq resolver.__
[![Donate](https://img.shields.io/badge/alipay-donate-yellow.svg)](https://qr.alipay.com/a6x07022gffiehykicipv1a)

View File

@ -137,4 +137,10 @@ public class DNSServerConfigFragment extends ConfigFragment {
return true;
}
@Override
public void onDestroy() {
super.onDestroy();
Daedalus.configurations.save();
}
}

View File

@ -35,7 +35,7 @@ public class DNSServersFragment extends ToolbarFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_dns_servers, container, false);
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView_dns_servers);
RecyclerView recyclerView = view.findViewById(R.id.recyclerView_dns_servers);
LinearLayoutManager manager = new LinearLayoutManager(getActivity());
recyclerView.setLayoutManager(manager);
adapter = new DNSServerAdapter();

View File

@ -55,11 +55,11 @@ public class RuleConfigFragment extends ConfigFragment {
public void onDestroy() {
super.onDestroy();
Daedalus.configurations.save();
stopThread();
intent = null;
mHandler.shutdown();
mHandler = null;
Daedalus.configurations.save();
}
private void stopThread() {

View File

@ -27,7 +27,7 @@ abstract public class ToolbarFragment extends Fragment {
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
menu = ((NavigationView) getActivity().findViewById(R.id.nav_view)).getMenu();
toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar);
toolbar = getActivity().findViewById(R.id.toolbar);
toolbar.getMenu().clear();
checkStatus();
}