0
Imageツールバー内のImageViewがタブレット上に配置されていない
ImageViewを含むツールバーがあります。私の問題は、この画像はタブレットのツールバーの中央に配置されていないことです(携帯端末では正常に動作します)。私に何ができる?重力が作用せず、相対レイアウトを使用できません。私の問題を示す上に画像があります。
あなたがアンドロイドを追加する必要があり<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:design="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="mfceo.project.matiasnagore.powerlist.MainActivity">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="45dp"
android:id="@+id/mainToolbar"
android:background="#fafafa"
android:titleTextColor="#ffffff"
android:layout_gravity="top">
<ImageView
android:id="@+id/imagePowerlist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/powerlist"
android:scaleType="centerInside"
android:paddingRight="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingLeft="55dp" />
</android.support.v7.widget.Toolbar>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@drawable/shadow_top"/>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#ffffff">
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@drawable/shadow"/>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
design:menu="@menu/bottom_nav_items"
design:itemIconTint="@drawable/selector"
design:itemTextColor="@drawable/selector"
android:background="#FFFAFAFA" />
</LinearLayout>
あなたはここに画像を投稿することができます。.. –
あなたは、タブレット用のレイアウトを提供してきましたか? – Eenvincible
どういう意味ですか? @envincible –