xml - Layout Memory Leak (Android Studio) -


i've located weird memory leak in 1 of xml layout files in app , don't know how fix it. here layout code:

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"                 xmlns:tools="http://schemas.android.com/tools"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 tools:context="com.deliciouslymad.tsukasa.critterbytes.screen.entereddungeonactivity">      <imageview         android:id="@+id/background"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true"         android:layout_alignparenttop="true"         android:background="@drawable/background"/>      <button         android:id="@+id/next_room"         style="?android:attr/buttonstylesmall"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:layout_centerhorizontal="true"         android:background="@drawable/scanbtn"         android:text="next room"/>      <button         android:id="@+id/menu_button"         style="?android:attr/buttonstylesmall"         android:layout_width="75dp"         android:layout_height="50dp"         android:layout_alignparentbottom="true"         android:layout_alignparentright="true"         android:layout_marginright="5dp"         android:background="@drawable/button"         android:text="exit"/>      <textview         android:id="@+id/room_number"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_above="@+id/next_room"         android:layout_centerhorizontal="true"         android:layout_marginbottom="57dp"         android:text="#"/>      <textview         android:id="@+id/dungeon_name"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparenttop="true"         android:layout_centerhorizontal="true"         android:layout_margintop="30dp"         android:text="dungeon name"         android:textsize="16sp"/>      <textview         android:id="@+id/dungeon_loot"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerhorizontal="true"         android:layout_marginbottom="25dp"         android:layout_margintop="225dp"         android:textisselectable="true"/>      <button         android:id="@+id/loot_ok_btn"         style="?android:attr/buttonstylesmall"         android:layout_width="60dp"         android:layout_height="50dp"         android:layout_below="@+id/dungeon_loot"         android:layout_centerhorizontal="true"         android:background="@drawable/button"         android:text="ok"         android:visibility="invisible"/>      <imageview         android:id="@+id/fieldview"         android:layout_width="350dp"         android:layout_height="wrap_content"         android:layout_above="@+id/next_room"         android:layout_centerhorizontal="true"         android:layout_marginbottom="140dp"         android:layout_margintop="50dp"         android:adjustviewbounds="true"         android:scaletype="fitxy"         android:background="@drawable/forest_field"/>      <imageview         android:id="@+id/transition"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_alignparenttop="true"         android:background="@drawable/transition"         android:visibility="invisible"/>      <imageview         android:id="@+id/battlewarning"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_alignparenttop="true"         android:background="@drawable/battle_warning"         android:visibility="invisible"/>  </relativelayout> 

everything fine until add last 3 items, "fieldview", "transition", , "battlewarning". far can tell, set background imageview (making them identical makes no difference). background imageview adds few kb's memory, other 3 make memory skyrocket 25mb~. drawables small (less 5 kb).

i have commented out these 3 imageviews in java files, has nothing that. memory spike happens when add imageviews xml file.

any appreciated.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -