SripadRaj SripadRaj - 3 months ago 37
Java Question

Add two text messages/prompt messages on zxing barcode scanner

I have integrated zxing in my project. I need to display a message on the scanning activity. I've used

intent.putExtra("PROMPT_MESSAGE","My custom text");
to display a message on the activity which is displayed at bottom of the layout. How can I display two messages on the layout. Is it possible?

Thanks.

Answer

Found Answer

I modified the xml layout capture.xml of Zxing. Added another Textview in the layout as below.

<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|center_horizontal" android:background="@color/transparent" android:text="Text 2" android:textColor="@color/status_text" android:textSize="20sp"/>

I could display the text on top.

Comments