Close OnlineFeedViewActivity when clicking border

This commit is contained in:
ByteHamster 2020-03-25 15:41:42 +01:00
parent c488b6c3fb
commit 75e34da30f
2 changed files with 11 additions and 5 deletions

View File

@ -113,6 +113,9 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
listView = findViewById(R.id.listview); listView = findViewById(R.id.listview);
progressBar = findViewById(R.id.progressBar); progressBar = findViewById(R.id.progressBar);
findViewById(R.id.transparentBackground).setOnClickListener(v -> finish());
findViewById(R.id.card).setOnClickListener(null);
String feedUrl = null; String feedUrl = null;
if (getIntent().hasExtra(ARG_FEEDURL)) { if (getIntent().hasExtra(ARG_FEEDURL)) {
feedUrl = getIntent().getStringExtra(ARG_FEEDURL); feedUrl = getIntent().getStringExtra(ARG_FEEDURL);

View File

@ -2,15 +2,18 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" xmlns:tools="http://schemas.android.com/tools"> android:layout_height="match_parent"
android:id="@+id/transparentBackground">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardCornerRadius="4dp" app:cardCornerRadius="4dp"
android:layout_margin="32dp" android:layout_margin="32dp"
android:elevation="16dp"> android:elevation="16dp"
android:id="@+id/card">
<FrameLayout <FrameLayout
android:orientation="vertical" android:orientation="vertical"
@ -27,7 +30,7 @@
<LinearLayout <LinearLayout
android:id="@+id/feedDisplay" android:id="@+id/feedDisplay"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout