yuriy-budiyev / code-scanner

Code scanner library for Android, based on ZXing
MIT License
1.09k stars 266 forks source link

How can we add text below frame ? #186

Open kartikterralogic opened 1 year ago

kartikterralogic commented 1 year ago

There is no property to add text (up, down, right,left). Similar like whatsApp. Please help

ninjia0 commented 1 year ago

if you are using android studio you can use RelativeLayout.

<RelativeLayout 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">

<com.budiyev.android.codescanner.CodeScannerView
    android:id="@+id/scanner_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="550dp"
    android:text="800362145621"
    android:textSize="24sp" />

</RelativeLayout>