SripadRaj SripadRaj - 1 year ago 128
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?


Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download