2016-06-23 3 views
2

저는 SO와 나머지 웹에서 찾고자하는 것을 정확히 찾을 수 없기 때문에 게시하고 있습니다. this을 살펴 보았지만 문제를 해결하는 방법을 정확히 알지 못했습니다. 내 응용 프로그램에서 GridLayout를 사용하는 동안GridLayout - 수직/수평 구속 조건이 일치하지 않습니다.

문제는 표면과 내 화면을 회전 할 때마다,이 같은 출력 것을 볼 것입니다 :

가로 모드에서 :

06-23 21:41:25.627 10222-10222/in.cryf.yaca D/android.widget.GridLayout: vertical constraints: y1-y0>=112, y2-y1>=112, y3-y2>=112, y4-y3>=112, y4-y0<=311 are inconsistent; permanently removing: y4-y0<=311. 

세로 모드를 : 그것은 내가 그 위에 게시 된 SO 링크에서, 내 응용 프로그램의 실행에는 영향을주지 않지만

06-23 21:41:28.124 10222-10222/in.cryf.yaca D/android.widget.GridLayout: horizontal constraints: x1-x0>=192, x2-x1>=192, x3-x2>=192, x4-x3>=192, x4-x0<=704 are inconsistent; permanently removing: x4-x0<=704. 

는 성능 문제를 가질 수 있음을 보인다.

내 XML의 GridLayout

: 내 응용 프로그램을 만들 때

<GridLayout 
     android:id="@+id/button_grid" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 
</GridLayout> 

이 외에도, 프로그래밍 방식 레이아웃에 뷰를 추가 할 수 있습니다.

답변

1

GridLayoutScrollView 안에 넣은 후에는 메시지가 더 이상 표시되지 않습니다.

<ScrollView 
     android:layout_below="@id/output" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 

    <HorizontalScrollView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content"> 

     <GridLayout 
      android:id="@+id/button_grid" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"> 
     </GridLayout > 


    </HorizontalScrollView> 

</ScrollView> 
0

이 문제는 비동기 작업 클래스를 확장 할 때 발생합니다. 개조를 사용하면 화면 회전 문제가 해결됩니다.

+1

내 앱의 어디서나 AsyncTask를 사용하지 않습니다. – Saurabh

+0

전체 로그 고양이 또는 스크린 샷을 공유하십시오 – Puneet

+0

나는 이미 문제를 해결했습니다. 내 대답을 보라. – Saurabh