내 Android 앱에 맞춤 대화 상자가 표시됩니다. 이 대화 상자에는 왼쪽에 표시 할 아이콘, 아이콘 옆에 표시 할 텍스트 (가로) 및 맨 아래에 표시 할 목록보기가 있습니다. 이 설정은 대화 상자 레이아웃을 가로 또는 세로로 설정할 수 없습니다. 어떻게하면됩니까? Thx위젯을 맞춤 방식으로 배치하는 방법
0
A
답변
0
두 개의 LinearLayouts를 사용하십시오. 첫 번째는 수직이어야합니다.
이 항목에는 두 개의 항목이 있어야합니다. 아이콘과 텍스트가 수평 인 또 다른 LinearLayout입니다. 그리고 세로 레이아웃의 다른 항목은 ListView 여야합니다. 그런
뭔가 :
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical">
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="whatever"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="whatever"/>
</LinearLayout>
<ListView android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>`
희망이 당신은 당신의 대화에 대한 사용자 정의 레이아웃을 생성하여이 작업을 수행하고 된 setContentView (보기)에 루트 뷰 오브젝트 나 레이아웃 리소스 ID를 전달할 수 있습니다
0
을 도왔다. :
customDialog = new Dialog(Activiyt.this);
customDialog.setContentView(R.layout.yourlayout);
customDialog.show();
자세한 내용은이 스레드를 확인하십시오 :
http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application
+0
Thx, 그 스레드 정말 유용합니다! –
관련 문제
- 1. jqPagination 위젯을 중앙에 배치하는 방법?
- 2. Android : 맞춤 버튼 위젯을 만드는 방법
- 3. Qt에서 하나의 위젯을 다른 위젯에 배치하는 방법
- 4. 모든 위젯을 화면에 맞춤
- 5. Android : 프로그래밍 방식으로 버튼을 중앙에 배치하는 방법?
- 6. QStackedLayout 안에 위젯을 중앙에 배치하는 방법은 무엇입니까?
- 7. 사용자 정의 컨트롤로 Google지도의 텍스트 버튼처럼 dojo 위젯을 배치하는 방법
- 8. WordPress - 위젯을 프로그래밍 방식으로 추가하기
- 9. Qt에 맞춤 위젯을 설치하는 방법은 무엇입니까?
- 10. Android - 프로그래밍 방식으로 위젯을 삭제할 수 있습니까?
- 11. sencha에서 맞춤 위젯을 구현하는 방법은 무엇입니까?
- 12. 모범 사례 : 맞춤 위젯을 바인딩 해제해야합니까?
- 13. ExtJS 4에서 맞춤 위젯을 만드는 방법은 무엇입니까?
- 14. capistrano를 사용하여 맞춤 보석을 배치하는 방법은 무엇입니까?
- 15. Dojo, 커스텀 위젯을 파괴하는 방법?
- 16. ItemsControl에서 ViewModels을 배치하는 방법
- 17. Silverlight 컨트롤을 배치하는 방법
- 18. Android 프로그래밍 방식으로 위젯을 사용할 수 있는지 감지하는 방법?
- 19. 필수 필드 유효성 검사기를 특정 위치에 프로그래밍 방식으로 배치하는 방법
- 20. 레이아웃 배경에 UIImageView를 배치하는 방법
- 21. 위젯을 만드는 방법을 가르쳐주세요
- 22. tk.Text 위젯을 그리는 방법?
- 23. Dijit 위젯을 렌더링하는 방법?
- 24. 위젯을 페이지에 넣는 방법
- 25. HelloGallery 위젯을 사용하는 방법
- 26. pyqt : 위젯을 제거하는 방법?
- 27. 초보자 - 위젯을 테스트하는 방법?
- 28. DOJO에서 위젯을 렌더링하는 방법
- 29. dojo : 위젯을 복제하는 방법?
- 30. 데스크톱 위젯을 만드는 방법
매우 유용 들으! –