To use Memory in Smart way we can use Convert View in Android.
- To reuse the memory for other Iterations.
- A parent View can't have once child view more than once.
Adapter Memory Management:
1)- Adapter by default creates new Object of View for every element in Array.
- Since the Application runs on Mobile it may crash because of low memory situation.
2)- To avoid creating new object every time getView() method accepts "Convert View" as return
value of previous iteration.
3)- It is null in first iteration and from next it is the return value of previous iteration.
There are three cases to use Convert View i.e.
1- Convert View Using Single View.
2- Convert View Using a Linear Layout.
3- Convert View Using Layout Inflator.
- To reuse the memory for other Iterations.
- A parent View can't have once child view more than once.
Adapter Memory Management:
1)- Adapter by default creates new Object of View for every element in Array.
- Since the Application runs on Mobile it may crash because of low memory situation.
2)- To avoid creating new object every time getView() method accepts "Convert View" as return
value of previous iteration.
3)- It is null in first iteration and from next it is the return value of previous iteration.
There are three cases to use Convert View i.e.
1- Convert View Using Single View.
2- Convert View Using a Linear Layout.
3- Convert View Using Layout Inflator.
No comments:
Post a Comment