최근에 내 프로그램을 실행할 때 지연이 발생했습니다. 내 활동 중 하나에 7 개의 이미지가 있고 더 많은 것을 추가 할 계획이지만 메신저가 아래로 스크롤하기 시작하면 작업 표시 줄 내가 XML에 숨겨져있다. (나는 그것을 활동에서 제거하는 방법을 모르기 때문에 숨겼다.) 당신이이 문제 (지연 문제)를 해결하는 방법을 알려줄 수 있기를 바란다.이미지를 추가 할 때 왜 지연이 있습니까?
<ScrollView 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=".EX" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="688dp" >
<ImageView
android:id="@+id/border"
android:layout_width="wrap_content"
android:layout_height="7dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/greenborder" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/imageView2"
android:layout_marginLeft="40dp"
android:layout_marginTop="50dp"
android:clickable="true"
android:src="@drawable/ss" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView1"
android:layout_marginRight="40dp"
android:clickable="true"
android:src="@drawable/cht" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignLeft="@+id/imageView1"
android:layout_below="@+id/imageView1"
android:layout_marginTop="28dp"
android:clickable="true"
android:src="@drawable/ags" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignLeft="@+id/imageView3"
android:layout_alignTop="@+id/imageView4"
android:clickable="true"
android:src="@drawable/as" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignLeft="@+id/imageView4"
android:layout_below="@+id/imageView4"
android:layout_marginTop="27dp"
android:clickable="true"
android:src="@drawable/ly" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignLeft="@+id/imageView5"
android:layout_alignTop="@+id/imageView6"
android:clickable="true"
android:src="@drawable/co" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/imageView3"
android:layout_centerHorizontal="true"
android:layout_marginBottom="9dp"
android:text="Select a category:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_alignLeft="@+id/imageView6"
android:layout_below="@+id/imageView6"
android:layout_marginTop="27dp"
android:clickable="true"
android:src="@drawable/fy" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView8"
android:layout_alignLeft="@+id/imageView7"
android:layout_alignRight="@+id/imageView7"
android:text="More available soon"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</ScrollView>
로그 캣 :
06-30 18 : 05 : 24.908 : E/LocSvc_IzatApiV02 (584) : W/가상 INT izat_core :: IzatApiV02 :: injectLocation (GpsExtLocation) : 665] : 에러! 주입 위치 실패
06-30 18 : 05 : 24.918 : E/LocSvc_ApiV02 (584) : W/가상 loc_api_adapter_err LocApiV02 :: injectPosition (double, double, float) : 492] : 오류! UNKNOWN 상태 = eLOC_CLIENT_FAILURE_INVALID_PARAMETER, inject_pos_ind.status =
06-30 18 : 05 : 24.968 : I/GCoreUlr (6145)를 성공적으로 삽입 위치
06-30 18 : 05 : 24.968 : I/GCoreUlr (6145) : 호출하지 않는 LocationReportingService, hasMoved : false, 경과 된 millis : 2176457, 요청 : 전화
06-30 18 : 05 : 28.802 : I/Choreographer (8748) : 건너 뛴 39 프레임! 응용 프로그램이 주 스레드에서 너무 많은 작업을하고있을 수 있습니다.
06-30 18 : 05 : 29.483 : I/Choreographer (8748) : 40 프레임 건너 뛰기! 응용 프로그램이 주 스레드에서 너무 많은 작업을하고있을 수 있습니다.
06-30 18 : 05 : 30.154 : I/Choreographer (8748) : 39 프레임 건너 뛰기! 응용 프로그램이 주 스레드에서 너무 많은 작업을하고있을 수 있습니다.
06-30 18 : 05 : 30.834 : I/Choreographer (8748) : 40 프레임 건너 뛰기! 응용 프로그램이 주 스레드에서 너무 많은 작업을하고있을 수 있습니다.
06-30 18 : 05 : 31.495 : I/Choreographer (8748) : 39 프레임 건너 뛰기! 응용 프로그램이 주 스레드에서 너무 많은 작업을하고있을 수 있습니다.
06-30 18 : 05 : 32.166 : I/Choreographer (8748) : 39 프레임 건너 뛰기! 응용 프로그램이 주 스레드에서 너무 많은 작업을하고있을 수 있습니다. 당신은 당신의 사진을 확장 할 수 있습니다
:
지연이 표시되면 logcat을 게시 할 수 있습니까? – BugaIulian
이것은 아마도로드하는 데 시간이 많이 걸리는 매우 무거운 이미지를 사용하고있는 이미지 때문일 수 있습니다. 친절하게 몇 가지 코드를 게시하십시오. – CodeWarrior
지연이 나타나면 logcat을 추가했습니다. 어떻게 해결합니까? –