Skip to content

Commit

Permalink
Add code to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc O'Morain committed Sep 16, 2016
1 parent 07b84c7 commit bc18886
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ public void onClickBreak(View view) {
s.length();
}

public void onClickCapture(View view) {
try {
onClickBreak(view);
} catch (Exception e) {
Sentry.captureException(e, "Exception caught in click handler");
}
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
Expand Down
10 changes: 8 additions & 2 deletions sentry-app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
Expand All @@ -10,4 +11,9 @@
android:layout_height="wrap_content"
android:onClick="onClickBreak" />

</RelativeLayout>
<Button android:text="Click to capture"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickCapture" />

</LinearLayout>

0 comments on commit bc18886

Please sign in to comment.