This is a migrated thread and some comments may be shown as answers.

Event handling and multiline text editors

1 Answer 109 Views
DataForm - Xamarin.Android
This is a migrated thread and some comments may be shown as answers.
Vaggelis
Top achievements
Rank 1
Vaggelis asked on 13 Apr 2016, 11:52 AM

Greetings,

I have a few more questions about the DataForm editors.

1)I am interested in starting a new activity when the user tries to edit a certain property. Should I implement some kind of event, or create a new editor that overrides a certain method (and which)?

2)I would like to know if and how I could setup a multiline text editor.

Thank you in advance,

vagg

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 18 Apr 2016, 01:34 PM
Hi Vaggelis,

Thank you for your questions.

1) If you want to use a new activity to edit a property, you can flag that property to be readonly so that the user can edit it using an editor and add an OnClickListener that you can use to make the navigation:

public class MyClickListener : Java.Lang.Object, View.IOnClickListener {
    public void OnClick (View v)
    {
        // Navigate to where you should.
    }
}
 
EntityPropertyViewer propertyViewer = (EntityPropertyViewer)dataForm.GetExistingEditorForProperty("Age");
propertyViewer.EditorView.SetOnClickListener (new MyClickListener ());

2) Here's how to make the editor's EditText support multi lines:

DataFormTextEditor textEditor = (DataFormTextEditor)dataForm.GetExistingEditorForProperty("Name");
((EditText)textEditor.EditorView).SetSingleLine (false);

I hope this information helps.

Regards,
Todor
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataForm - Xamarin.Android
Asked by
Vaggelis
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or