|
|
@ -32,7 +32,6 @@ import android.text.Editable;
|
|
|
|
import android.text.TextUtils;
|
|
|
|
import android.text.TextUtils;
|
|
|
|
import android.text.TextWatcher;
|
|
|
|
import android.text.TextWatcher;
|
|
|
|
import android.text.method.LinkMovementMethod;
|
|
|
|
import android.text.method.LinkMovementMethod;
|
|
|
|
import android.util.Patterns;
|
|
|
|
|
|
|
|
import android.view.KeyEvent;
|
|
|
|
import android.view.KeyEvent;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.Menu;
|
|
|
|
import android.view.Menu;
|
|
|
@ -135,11 +134,6 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
private String signature = null;
|
|
|
|
private String signature = null;
|
|
|
|
private boolean saving = false;
|
|
|
|
private boolean saving = false;
|
|
|
|
|
|
|
|
|
|
|
|
private static final int REQUEST_COLOR = 1;
|
|
|
|
|
|
|
|
private static final int REQUEST_SAVE = 2;
|
|
|
|
|
|
|
|
private static final int REQUEST_DELETE = 3;
|
|
|
|
|
|
|
|
private static final int REQUEST_SIGNATURE = 4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
@ -329,7 +323,7 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
FragmentDialogColor fragment = new FragmentDialogColor();
|
|
|
|
FragmentDialogColor fragment = new FragmentDialogColor();
|
|
|
|
fragment.setArguments(args);
|
|
|
|
fragment.setArguments(args);
|
|
|
|
fragment.setTargetFragment(FragmentIdentity.this, REQUEST_COLOR);
|
|
|
|
fragment.setTargetFragment(FragmentIdentity.this, ActivitySetup.REQUEST_IDENTITY_COLOR);
|
|
|
|
fragment.show(getParentFragmentManager(), "identity:color");
|
|
|
|
fragment.show(getParentFragmentManager(), "identity:color");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -341,7 +335,7 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
|
Intent intent = new Intent(getContext(), ActivitySignature.class);
|
|
|
|
Intent intent = new Intent(getContext(), ActivitySignature.class);
|
|
|
|
intent.putExtra("html", signature);
|
|
|
|
intent.putExtra("html", signature);
|
|
|
|
startActivityForResult(intent, REQUEST_SIGNATURE);
|
|
|
|
startActivityForResult(intent, ActivitySetup.REQUEST_IDENITY_SIGNATURE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -870,7 +864,7 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
FragmentDialogAsk fragment = new FragmentDialogAsk();
|
|
|
|
FragmentDialogAsk fragment = new FragmentDialogAsk();
|
|
|
|
fragment.setArguments(aargs);
|
|
|
|
fragment.setArguments(aargs);
|
|
|
|
fragment.setTargetFragment(FragmentIdentity.this, REQUEST_SAVE);
|
|
|
|
fragment.setTargetFragment(FragmentIdentity.this, ActivitySetup.REQUEST_IDENTITY_SAVE);
|
|
|
|
fragment.show(getParentFragmentManager(), "identity:save");
|
|
|
|
fragment.show(getParentFragmentManager(), "identity:save");
|
|
|
|
} else if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
} else if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
getParentFragmentManager().popBackStack();
|
|
|
|
getParentFragmentManager().popBackStack();
|
|
|
@ -1194,7 +1188,7 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
FragmentDialogAsk fragment = new FragmentDialogAsk();
|
|
|
|
FragmentDialogAsk fragment = new FragmentDialogAsk();
|
|
|
|
fragment.setArguments(aargs);
|
|
|
|
fragment.setArguments(aargs);
|
|
|
|
fragment.setTargetFragment(FragmentIdentity.this, REQUEST_DELETE);
|
|
|
|
fragment.setTargetFragment(FragmentIdentity.this, ActivitySetup.REQUEST_IDENTITY_DELETE);
|
|
|
|
fragment.show(getParentFragmentManager(), "identity:delete");
|
|
|
|
fragment.show(getParentFragmentManager(), "identity:delete");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1204,7 +1198,7 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
switch (requestCode) {
|
|
|
|
switch (requestCode) {
|
|
|
|
case REQUEST_COLOR:
|
|
|
|
case ActivitySetup.REQUEST_IDENTITY_COLOR:
|
|
|
|
if (resultCode == RESULT_OK && data != null) {
|
|
|
|
if (resultCode == RESULT_OK && data != null) {
|
|
|
|
if (ActivityBilling.isPro(getContext())) {
|
|
|
|
if (ActivityBilling.isPro(getContext())) {
|
|
|
|
Bundle args = data.getBundleExtra("args");
|
|
|
|
Bundle args = data.getBundleExtra("args");
|
|
|
@ -1213,7 +1207,7 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
startActivity(new Intent(getContext(), ActivityBilling.class));
|
|
|
|
startActivity(new Intent(getContext(), ActivityBilling.class));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case REQUEST_SAVE:
|
|
|
|
case ActivitySetup.REQUEST_IDENTITY_SAVE:
|
|
|
|
if (resultCode == RESULT_OK) {
|
|
|
|
if (resultCode == RESULT_OK) {
|
|
|
|
new Handler().post(new Runnable() {
|
|
|
|
new Handler().post(new Runnable() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -1225,11 +1219,11 @@ public class FragmentIdentity extends FragmentBase {
|
|
|
|
} else if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
} else if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
getParentFragmentManager().popBackStack();
|
|
|
|
getParentFragmentManager().popBackStack();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case REQUEST_DELETE:
|
|
|
|
case ActivitySetup.REQUEST_IDENTITY_DELETE:
|
|
|
|
if (resultCode == RESULT_OK)
|
|
|
|
if (resultCode == RESULT_OK)
|
|
|
|
onDelete();
|
|
|
|
onDelete();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case REQUEST_SIGNATURE:
|
|
|
|
case ActivitySetup.REQUEST_IDENITY_SIGNATURE:
|
|
|
|
if (resultCode == RESULT_OK)
|
|
|
|
if (resultCode == RESULT_OK)
|
|
|
|
onHtml(data.getExtras());
|
|
|
|
onHtml(data.getExtras());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|