Emulator Run Slowly When Come To A Specific Layout
Solution 1:
The application may be doing too much work on its main thread.
Layouts are a key part of Android applications that directly affect the user experience. If implemented poorly, your layout can lead to a memory hungry application with slow UIs. The Android SDK includes tools to help you identify problems in your layout performance, which when combined the lessons here, you will be able to implement smooth scrolling interfaces with a minimum memory footprint.
Loading Views On Demand
Beyond simply including one layout component within another layout, you might want to make the included layout visible only when it's needed, sometime after the activity is running. This lesson shows how you can improve your layout's initialization performance by loading portions of your layout on demand.
Wrong Concept
<ImageView
android:layout_gravity="center"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:layout_marginTop="20dp"
android:layout_width="200dp"
android:layout_height="200dp"
android:id="@+id/imageView" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add picture"
android:id="@+id/button"
android:layout_gravity="center_horizontal"
android:layout_weight="0.05" />
In here you are using android:layout_weight
, Well .Then another case you set Hard coded height & Width ,That's why have problem . Avoid Hard coded Value .
Post a Comment for "Emulator Run Slowly When Come To A Specific Layout"