1
레이아웃이 인 이미지보기입니다. 내가 android:Theme.DeviceDefault.Light
에 부모 테마를 변경하면테마에 따른 화면 크기
<?xml version="1.0" encoding="utf-8"?>
<android.support.percent.PercentRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/WHITE">
<ImageView
android:id="@+id/powered_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/powered_by" />
<ImageView
android:id="@+id/splash_logo"
android:src="@drawable/logo"
app:layout_widthPercent="70%"
app:layout_heightPercent="70%"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:visibility="invisible" />
</android.support.percent.PercentRelativeLayout>
가 여기 내 활동
<style name="SplashTheme" parent="android:Theme.Holo.Light">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
에 대한 테마 설정입니다, 이미지 뷰는하지 화면의 중앙에, 조금 더 나타납니다. 내 기기의 부모보기가 이제 화면 하단에서부터 시작되지만 하단 툴바 (화면 버튼이있는 Nexus 5X 사용)에서 시작됩니다.
기기의 기본 테마를 현대적인 대화 상자 모양으로 사용하고 싶지만이 이미지보기를 모든 기기의 가운데에 정확하게 표시해야합니다.
어떻게 만드시겠습니까?
그것은 나를 위해 작동하지 않습니다을 변경하고자하는 항목의 값을 변경해야합니다. 나는 같은 스타일을 사용했다. Image View는이 스타일에 중점을 두지 않는다. –
문제가 있는지 레이아웃 코드를 게시해야합니다. – ganlaw