Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue with garbage collection Android
    primarykey
    data
    text
    <p>I'm developing an app for tivi box powered by Android2.2. I have a loading screen and all of data have been downloaded. After data downloaded it change to home screen . My home screen layout has <img src="https://i.stack.imgur.com/GZcIM.png" alt="enter image description here"></p> <p>4 relative layouts are the same. <img src="https://i.stack.imgur.com/73No1.png" alt="enter image description here"></p> <p>When i move from gridview to ImageButtons and versa, alot of GC fire in logcat. So it's very slow when moving between items.</p> <p><img src="https://i.stack.imgur.com/8mtqy.png" alt="enter image description here"></p> <p>i tried to use allocation tracker and find it allocated a lot in text.staticLayout every time i move between items. When i remove 2 relativelayout in scrollview, GC still fire but the animation is less slow. So i think my problem is scrollview. Can you show my how to find what cause alot of GC (guide to use allocation tracker more effectively. I read 2 articles on Romain Guy blog about DDMS and google I/O memory managerment for Android.) <img src="https://i.stack.imgur.com/eqwPk.png" alt="enter image description here"></p> <p>My adapter is simple. I also try to remove all applyReflection, custom font so it's only getName from Item and set to TextView. But it still slow. applyReflection class from <em><a href="http://www.inter-fuser.com/2009/12/android-reflections-with-bitmaps.html" rel="nofollow noreferrer">this tut</a></em></p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub Clip item = listClip.get(position); View itemView; ViewHolder holder; if(convertView == null){ LayoutInflater inflater = LayoutInflater.from(mContext); itemView = inflater.inflate(R.layout.griditem_home, null); holder = new ViewHolder(); holder.icon = (ImageView)itemView.findViewById(R.id.filmIcon); holder.genre = (TextView)itemView.findViewById(R.id.cliptype); holder.view = (TextView)itemView.findViewById(R.id.clipview); holder.name = (TextView)itemView.findViewById(R.id.clipName); holder.view.setTypeface(myriadRegular); holder.name.setTypeface(myriadBold); holder.genre.setTypeface(myriadRegular); itemView.setTag(holder); } else { itemView = convertView; holder = (ViewHolder) itemView.getTag(); } holder.icon.setImageBitmap(Utils.applyReflection(bitmap)); holder.name.setText(item.getName()); holder.view.setText("Number of view: "+item.getNumberView()); holder.genre.setText(item.getTypename()); return itemView; } class ViewHolder { ImageView icon; TextView name, genre, view; } </code></pre> <p>Thanks for your help. I'm new Android</p>
    singulars
    1. This table or related slice is empty.
    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.
    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