0

I've built a simple xml layout for an Android Wear application. The layout below contains vector graphics called ic_chevron_up|down|left|right.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:orientation="vertical"
    tools:context="com.umpquariversoftware.metronome.MainActivity"
    tools:deviceIds="wear">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">

        </View>
        <ImageView
            android:id="@+id/buttonUp"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:src="@drawable/ic_chevron_up"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">

        </View>
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <ImageView
            android:id="@+id/buttonLeft"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:src="@drawable/ic_chevron_left"/>
        <ImageView
            android:id="@+id/buttonCenter"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent" />
        <ImageView
            android:id="@+id/buttonRight"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:src="@drawable/ic_chevron_right"/>
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">
        </View>
        <ImageView
            android:id="@+id/buttonDown"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:src="@drawable/ic_chevron_down"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">
        </View>
    </LinearLayout>
</LinearLayout>

In the emulator, things render just as I'd expect them to. However, when I push this to a physical device (ASUS Zenwatch 3), the graphics don't show up. Doesn't look to be a boundary/scaling issue, or a problem with round/square faces. The layout adjusts for all of that. Replacing the vector graphics with standard .png files resolves the issue.

Anyone else seeing this kind of issue on other Android Wear devices?

Thanks!

0 Answers0