NexusDialog
NexusDialog copied to clipboard
Create a Custom Element in a Fragment using NexusDialog
I want to create custom elements through a fragment using nexusDialog Library (https://github.com/dkharrat/NexusDialog ) i created a custom element using the example given from the developer but i have no idea how to generate those custom components in fragment not activtiy. i want to pass data into edit text and get values of edittext to the fragment using the library
here is my code
Custom Component
public class EditTextComp extends FormElementController {
EditText editText = null;
TextView textView = null;
public EditTextComp(Context context) {
super(context, null);
}
@Override
protected View createView() {
return createComponent();
}
@Override
public void refresh() {
}
@Override
public void setError(String message) {
}
private View createComponent() {
LayoutInflater inflater = LayoutInflater.from(getContext());
return inflater.inflate(R.layout.compound_comp_edit_text, null);
}
public EditText getEditText() {
return (EditText) getView().findViewById(R.id.editText);
}
}
how can i create this in a fragment?
answer i wrote https://stackoverflow.com/questions/48058844/create-a-custom-element-in-a-fragment-using-nexusdialog