|
|
@ -39,6 +39,9 @@ import android.text.TextWatcher;
|
|
|
|
import android.text.method.LinkMovementMethod;
|
|
|
|
import android.text.method.LinkMovementMethod;
|
|
|
|
import android.util.Patterns;
|
|
|
|
import android.util.Patterns;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
|
|
|
|
import android.view.Menu;
|
|
|
|
|
|
|
|
import android.view.MenuInflater;
|
|
|
|
|
|
|
|
import android.view.MenuItem;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.Button;
|
|
|
|
import android.widget.Button;
|
|
|
@ -90,6 +93,7 @@ public class FragmentQuickSetup extends FragmentBase {
|
|
|
|
@Nullable
|
|
|
|
@Nullable
|
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
|
setSubtitle(R.string.title_setup);
|
|
|
|
setSubtitle(R.string.title_setup);
|
|
|
|
|
|
|
|
setHasOptionsMenu(true);
|
|
|
|
|
|
|
|
|
|
|
|
view = (ViewGroup) inflater.inflate(R.layout.fragment_quick_setup, container, false);
|
|
|
|
view = (ViewGroup) inflater.inflate(R.layout.fragment_quick_setup, container, false);
|
|
|
|
|
|
|
|
|
|
|
@ -168,6 +172,34 @@ public class FragmentQuickSetup extends FragmentBase {
|
|
|
|
return view;
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
|
|
|
|
|
|
|
inflater.inflate(R.menu.menu_quick_setup, menu);
|
|
|
|
|
|
|
|
super.onCreateOptionsMenu(menu, inflater);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onPrepareOptionsMenu(Menu menu) {
|
|
|
|
|
|
|
|
PackageManager pm = getContext().getPackageManager();
|
|
|
|
|
|
|
|
menu.findItem(R.id.menu_help).setVisible(Helper.getIntentSetupHelp().resolveActivity(pm) != null);
|
|
|
|
|
|
|
|
super.onPrepareOptionsMenu(menu);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
|
|
|
|
switch (item.getItemId()) {
|
|
|
|
|
|
|
|
case R.id.menu_help:
|
|
|
|
|
|
|
|
onMenuHelp();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void onMenuHelp() {
|
|
|
|
|
|
|
|
startActivity(Helper.getIntentSetupHelp());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onSave(boolean check) {
|
|
|
|
private void onSave(boolean check) {
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putString("name", etName.getText().toString());
|
|
|
|
args.putString("name", etName.getText().toString());
|
|
|
|