Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid App getting very slow using background image
    primarykey
    data
    text
    <p>In my application menu slider and horizontal slider code added. In Horizontal layout inside tow Linear layout each are different background.</p> <p>If i will give same background working file. If i will give different background app getting very slow.</p> <p>below i given my code and layout.</p> <p><strong>My layout code :</strong> </p> <pre><code> &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/relBg" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/img1" &gt; &lt;RelativeLayout android:id="@+id/relBg" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/img2" &gt; &lt;com.application.utils.HorizontalPager android:id="@+id/horizontal_pager" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/homebg"" &gt; &lt;include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/homepageview" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/cal_bg" &gt; &lt;include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/calendarview" /&gt; &lt;/LinearLayout&gt; &lt;/com.application.utils.HorizontalPager&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>image sizes are 40kb only.</p> <p>In this two relative layout using different images, if i use like this app getting very slow.</p> <p><strong>my Code:</strong></p> <pre><code>LayoutInflater inflater = LayoutInflater.from(this); scrollView = (FacebookSlideView) inflater.inflate(R.layout.screen_scroll_with_list_menu, null); setContentView(scrollView); final Stack stack=new Stack(); menu = inflater.inflate(R.layout.profile_menu, null); app = inflater.inflate(R.layout.homepage, null); btnSlide = (Button) app.findViewById(R.id.BtnSlide); fadeGray_Rel = (LinearLayout)app.findViewById(R.id.fadeGray_Rel); fadeGray_Rel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub slideAnimation(scrollView, menu); } }); </code></pre> <p>If i use same image both Relative layout working fine, not getting slow.</p> <p>my logcat details : </p> <pre><code>11-13 14:37:24.834: I/Choreographer(2605): Skipped 34 frames! The application may be doing too much work on its main thread. 11-13 14:37:24.838: D/OpenGLRenderer(2605): TextureCache::callback: name, removed size, mSize = 68, 11632640, 13043632 11-13 14:37:24.838: D/OpenGLRenderer(2605): TextureCache::get: create texture(0xb96d2358): name, size, mSize = 75, 1048576, 14092208 11-13 14:37:24.838: D/OpenGLRenderer(2605): TextureCache::callback: name, removed size, mSize = 69, 11632640, 2459568 11-13 14:37:25.078: D/OpenGLRenderer(2605): TextureCache::get: create texture(0xb96fdfa0): name, size, mSize = 76, 11632640, 14092208 </code></pre> <p>thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload