From 5456292ef206b9a102e4dacd00da4d83fd921d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= <tomasz.polgrabia@unicredit.eu> Date: Fri, 2 Sep 2016 14:56:09 +0200 Subject: [PATCH] Crash button. --- .../fragments/WikiLocationsFragment.java | 9 ++++++++- app/src/main/res/layout/fragment_wiki_locations.xml | 12 +++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/WikiLocationsFragment.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/WikiLocationsFragment.java index 4066970..a79f3cd 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/WikiLocationsFragment.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/WikiLocationsFragment.java @@ -24,7 +24,14 @@ public class WikiLocationsFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment - return inflater.inflate(R.layout.fragment_wiki_locations, container, false); + View inflatedView = inflater.inflate(R.layout.fragment_wiki_locations, container, false); + inflatedView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + throw new RuntimeException("FAKE BUG 2"); + } + }); + return inflatedView; } } diff --git a/app/src/main/res/layout/fragment_wiki_locations.xml b/app/src/main/res/layout/fragment_wiki_locations.xml index d6d8986..2876d88 100644 --- a/app/src/main/res/layout/fragment_wiki_locations.xml +++ b/app/src/main/res/layout/fragment_wiki_locations.xml @@ -1,13 +1,19 @@ -<FrameLayout 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" tools:context="pl.tpolgrabia.urbanexplorer.fragments.WikiLocationsFragment"> <!-- TODO: Update blank fragment layout --> <TextView android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:text="@string/hello_blank_fragment"/> -</FrameLayout> + <Button android:id="@+id/crash" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Crash"/> + +</LinearLayout>