마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

이미지 이동하는 현상 수정방안좀 알려주세요.

0 추천

앱을 실행하다가 보면 어느순간 이미지가 이동해져 있더라구요...

왜 이런 현상이 일어나는지 잘 모르겠는데

아마 이미지 때문에 램???힙영역이 모지라서 옮겨지는거같은데..

정확한 이유를 모르겠습니다.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    		  android:id="@+id/bt_state"
    		  android:background="@drawable/bt_on"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical">
              
       <LinearLayout
        	android:layout_width="match_parent"
        	android:layout_height="0dp"
        	android:layout_weight="200"
        	android:weightSum="1080">

           <LinearLayout
               android:layout_width="wrap_content"
               android:layout_height="match_parent"
               android:orientation="vertical" 
               android:layout_weight="100">   
               
	            <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_weight="2.5">
                 </LinearLayout>

                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_weight="5"> 
                     <LinearLayout
			               android:layout_width="match_parent"
			               android:layout_height="match_parent"
			               android:orientation="horizontal" >
  			                 <LinearLayout
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
                                 android:layout_weight="0.1">
			                 </LinearLayout>         
			                 <LinearLayout
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
                                 android:layout_weight="1" >
			                  	 <ImageButton
			                  	     android:id="@+id/qrcode"
			                  	     android:layout_width="wrap_content"
			                  	     android:layout_height="wrap_content"
			                  	     android:background="@drawable/qrcode" />
			                 </LinearLayout>       
			         
                     </LinearLayout>
                     
                 </LinearLayout>
          	</LinearLayout>
            <TextView
        		android:layout_width="wrap_content"
        		android:layout_height="wrap_content"
        		android:layout_weight="875"/>
       

			<LinearLayout
               android:layout_width="wrap_content"
               android:layout_height="match_parent"
               android:orientation="vertical" 
               android:layout_weight="105">   
               
	            <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_weight="3">
                 </LinearLayout>

                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_weight="3"> 
                     <LinearLayout
			               android:layout_width="match_parent"
			               android:layout_height="match_parent"
			               android:orientation="horizontal" >
  			                 <LinearLayout
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
                                 android:layout_weight="0.2">
			                 </LinearLayout>         
			                 <LinearLayout
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
                                 android:layout_weight="0.2" >
			                  	 <ImageButton
			                  	     android:id="@+id/option"
			                  	     android:layout_width="wrap_content"
			                  	     android:layout_height="wrap_content"
			                  	     android:background="@drawable/option" />
			                 </LinearLayout>       
  			                 <LinearLayout
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
                                 android:layout_weight="0.2">
			                 </LinearLayout>         			         
                     </LinearLayout>
                     
                 </LinearLayout>
	            <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_weight="2">
                 </LinearLayout>                 
                 
          	 </LinearLayout>            
            
   	</LinearLayout>

    <LinearLayout
       	android:layout_width="match_parent"
       	android:layout_height="0dp"
       	android:layout_weight="1720">
   	</LinearLayout>   

</LinearLayout>

 

쿠쿠부다스 (6,470 포인트) 님이 2017년 3월 16일 질문
힙사이즈 부족하면 이미지가 위치가 이동된다고 누가 그러던가요?;;;
이미지 출력되지 않는다거나 OOM으로 디진다면 말이 되겠지만 힙사이즈때문에 이미지가 이동된다는 얘기는 못들어본거 같네요;;
답변 감사합니다. 다시 한번 진행해봐야겠네요 ㅎㅎ
ㅋㅋㅋㅋ 메모리가 부족해서 움직이다뇨ㅋㅋ 한참웃었습니다 ㅋ

1개의 답변

0 추천
 
채택된 답변
이미지 리소스가 qrcode와 option 만 있어서

첨부한 이미지와 비교해보 수가 없네요.

 

댓글과 마찬가지로.. 힙사이즈가 부족해서 이미지가 이동된다라는 말은 금시초문입니다.

어느 플랫폼이던 그런경우는 없습니다.

 

진행하신 소스코드부터 확인해보세요.
개발자초심 (21,220 포인트) 님이 2017년 3월 17일 답변
쿠쿠부다스님이 2017년 3월 17일 채택됨
...