In case, you 'change' a textview by edittext you can use a ViewSwitcher
Example:
- LAYOUT
<ViewSwitcher
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/my_switcher"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/clickable_text_view"
android:clickable="true"
android:onClick="TextViewClicked"
android:text="@string/some_value" />
<EditText
android:id="@+id/hidden_edit_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/some_value" >
</EditText>
</ViewSwitcher>
- ACTIVITY
public void TextViewClicked() {
ViewSwitcher switcher = (ViewSwitcher) findViewById(R.id.my_switcher);
switcher.showNext(); //or switcher.showPrevious();
TextView myTV = (TextView) switcher.findViewById(R.id.clickable_text_view);
myTV.setText("value");
}
However, when it comes to a lot of information, I've never come to assess whether this solution impacts performance.
In particular, in most cases, I instantiate a direct edittext in 'Enable: false' mode and when I click the button to edit I enable editable edit 'Enable: true'.