Skip to content

Instantly share code, notes, and snippets.

@Sren-Hmkn
Created August 6, 2018 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sren-Hmkn/03965075c2599f143baa8b12cfc1299e to your computer and use it in GitHub Desktop.
Save Sren-Hmkn/03965075c2599f143baa8b12cfc1299e to your computer and use it in GitHub Desktop.
Read-button and textview for CameraActivity
//...
//...
<Button
android:id="@+id/read_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/cam_view"
android:text="read it!"
android:layout_margin="4dp"/>
<TextView
android:id="@+id/read_text_view"
android:layout_width="match_parent"
android:layout_height="100dp"
android:textSize="20sp"
android:layout_below="@id/read_button"
android:layout_margin="4dp"
tools:text="testtesttext"/>
// </RelativeLayout>
//</ScrollView>
// ...
// ...
// JavaCameraView javaCameraView;
// Button makeNormal, makeGray, makeCanny, makeDilate, makeErode;
Button makeRead;
TextView readTextView;
Bitmap bitmap;
// Mat usedMat;
//
// BaseLoaderCallback mLoaderCallBack = new BaseLoaderCallback(this) {}
// ...
// ...
// @Override
// protected void onCreate(Bundle savedInstanceState) {
// ...
// makeCanny = (Button) findViewById(R.id.canny_mode);
// makeDilate = (Button) findViewById(R.id.dilate_mode);
// makeErode = (Button) findViewById(R.id.erose_mode);
makeRead = (Button) findViewById(R.id.read_button);
readTextView = (TextView) findViewById(R.id.read_text_view);
// ...
// ...
// makeCanny.setOnClickListener(new View.OnClickListener() { });
makeRead.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// we'll do stuff here
}
});
// ...
// ...
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment