5

I don't know if I should ask this here but has anyone had this issue where Huawei devices with Android 7.0 had a bug where if you set the rotationY attribute to a view in XML, the view will not be rendered at runtime?

XML code:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"
    android:rotationY="180">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        android:textSize="33sp"
        android:textColor="#000"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

Xiaomi phone with Android 6.0 Xiaomi phone with Android 6.0

Huawei Honor 6X with Android 7.0 Huawei Honor 6X with Android 7.0

I don't have the screenshot of the Huawei devices with Android 6.0 because that was before the upgrade but I can assure you it was working fine. The issue also persists with different Huawei devices with Android 7.0 based on feedback I've received. I also tested with attribute rotationX but it was still the same. Does anyone has any idea how to fix this?

Trancol
  • 227
  • 1
  • 4
  • 15
  • oh my god man your question give me a solution for my problem, I also have a problem with my recycler view items not visible on some of Huawei devices and I am already using android:rotationY="180" that was the problem but I don't know why it occurred only on Huawei – Biro Nader Aug 10 '18 at 02:51
  • Idk why it happens either but I'm guessing it had to do with EMUI. – Trancol Aug 10 '18 at 08:37

0 Answers0