можно достичь, установив setScaleY(-1f)
на макете.
Так ваш главный макет может выглядеть следующим образом (immitating ваш пример изображения):
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/source_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:text="LOREM"
android:textColor="#0084E2"/>
<TextView
android:id="@+id/copy_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#0084E2"
android:scaleY="-1"
android:text="LOREM"
android:textColor="@android:color/white"/>
</LinearLayout>
Второй View
(или ViewGroup
) должна быть точной копией вашего первого. Вы можете создать пользовательский ViewGroup
, который автоматически создаст копию View
и установите его scaleY
на -1f
.
см. Здесь https://github.com/HannahMitt/HomeMirror –
Это не связано с моим вопросом .. Мне не нужна какая-либо функция камеры. – Nirel