|
|
@ -46,6 +46,7 @@ import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
import android.widget.ArrayAdapter;
|
|
|
|
import android.widget.ArrayAdapter;
|
|
|
|
|
|
|
|
import android.widget.AutoCompleteTextView;
|
|
|
|
import android.widget.Button;
|
|
|
|
import android.widget.Button;
|
|
|
|
import android.widget.CheckBox;
|
|
|
|
import android.widget.CheckBox;
|
|
|
|
import android.widget.CompoundButton;
|
|
|
|
import android.widget.CompoundButton;
|
|
|
@ -110,7 +111,8 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
private EditText etRealm;
|
|
|
|
private EditText etRealm;
|
|
|
|
|
|
|
|
|
|
|
|
private EditText etName;
|
|
|
|
private EditText etName;
|
|
|
|
private EditText etCategory;
|
|
|
|
private ArrayAdapter<String> adapterCategory;
|
|
|
|
|
|
|
|
private AutoCompleteTextView etCategory;
|
|
|
|
private ViewButtonColor btnColor;
|
|
|
|
private ViewButtonColor btnColor;
|
|
|
|
private TextView tvColorPro;
|
|
|
|
private TextView tvColorPro;
|
|
|
|
|
|
|
|
|
|
|
@ -434,6 +436,10 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adapterCategory = new ArrayAdapter<>(getContext(), R.layout.spinner_item1_dropdown, android.R.id.text1);
|
|
|
|
|
|
|
|
etCategory.setThreshold(1);
|
|
|
|
|
|
|
|
etCategory.setAdapter(adapterCategory);
|
|
|
|
|
|
|
|
|
|
|
|
btnColor.setOnClickListener(new View.OnClickListener() {
|
|
|
|
btnColor.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
@ -1597,6 +1603,11 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> categories = db.account().getAccountCategories();
|
|
|
|
|
|
|
|
if (categories == null)
|
|
|
|
|
|
|
|
categories = new ArrayList<>();
|
|
|
|
|
|
|
|
args.putStringArrayList("categories", new ArrayList<>(categories));
|
|
|
|
|
|
|
|
|
|
|
|
List<EntityIdentity> identities = db.identity().getIdentities(id);
|
|
|
|
List<EntityIdentity> identities = db.identity().getIdentities(id);
|
|
|
|
if (identities != null && identities.size() == 1)
|
|
|
|
if (identities != null && identities.size() == 1)
|
|
|
|
args.putString("personal", identities.get(0).name);
|
|
|
|
args.putString("personal", identities.get(0).name);
|
|
|
@ -1617,6 +1628,9 @@ public class FragmentAccount extends FragmentBase {
|
|
|
|
aaProvider.setDropDownViewResource(R.layout.spinner_item1_dropdown);
|
|
|
|
aaProvider.setDropDownViewResource(R.layout.spinner_item1_dropdown);
|
|
|
|
spProvider.setAdapter(aaProvider);
|
|
|
|
spProvider.setAdapter(aaProvider);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adapterCategory.clear();
|
|
|
|
|
|
|
|
adapterCategory.addAll(args.getStringArrayList("categories"));
|
|
|
|
|
|
|
|
|
|
|
|
if (savedInstanceState == null) {
|
|
|
|
if (savedInstanceState == null) {
|
|
|
|
JSONObject jcondition = new JSONObject();
|
|
|
|
JSONObject jcondition = new JSONObject();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|