aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java15
-rw-r--r--app/src/main/res/layout/fragment_theme_preview_comments.xml4
-rw-r--r--app/src/main/res/layout/fragment_theme_preview_posts.xml2
-rw-r--r--app/src/main/res/layout/item_comment.xml2
-rw-r--r--app/src/main/res/layout/item_flair.xml3
-rw-r--r--app/src/main/res/layout/item_post_compact.xml2
-rw-r--r--app/src/main/res/layout/item_post_compact_right_thumbnail.xml2
-rw-r--r--app/src/main/res/layout/item_post_detail_gallery.xml3
-rw-r--r--app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml3
-rw-r--r--app/src/main/res/layout/item_post_detail_link.xml3
-rw-r--r--app/src/main/res/layout/item_post_detail_no_preview_link.xml6
-rw-r--r--app/src/main/res/layout/item_post_detail_text.xml3
-rw-r--r--app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml3
-rw-r--r--app/src/main/res/layout/item_post_detail_video_autoplay.xml3
-rw-r--r--app/src/main/res/layout/item_post_gallery.xml2
-rw-r--r--app/src/main/res/layout/item_post_no_preview_link.xml2
16 files changed, 21 insertions, 37 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
index fcbc0608..f318c1b5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
@@ -262,7 +262,17 @@ public class LinkResolverActivity extends AppCompatActivity {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
- List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
+ try {
+ startActivity(intent);
+ } catch (ActivityNotFoundException e) {
+ if (handleError) {
+ openInCustomTabs(uri, pm, false);
+ } else {
+ Toast.makeText(this, R.string.no_browser_found, Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ /*List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
ArrayList<String> packageNames = new ArrayList<>();
String currentPackageName = getApplicationContext().getPackageName();
@@ -289,10 +299,9 @@ public class LinkResolverActivity extends AppCompatActivity {
} else {
Toast.makeText(this, R.string.no_browser_found, Toast.LENGTH_SHORT).show();
}
- }
+ }*/
}
-
private ArrayList<ResolveInfo> getCustomTabsPackages(PackageManager pm) {
// Get default VIEW intent handler.
Intent activityIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.example.com"));
diff --git a/app/src/main/res/layout/fragment_theme_preview_comments.xml b/app/src/main/res/layout/fragment_theme_preview_comments.xml
index 69e8d7f3..c810b949 100644
--- a/app/src/main/res/layout/fragment_theme_preview_comments.xml
+++ b/app/src/main/res/layout/fragment_theme_preview_comments.xml
@@ -145,7 +145,6 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
app:layout_constraintStart_toEndOf="@+id/score_text_view_theme_preview_comments_fragment"
app:layout_constraintEnd_toStartOf="@id/more_button_theme_preview_comments_fragment"
app:layout_constraintTop_toTopOf="parent"
@@ -176,7 +175,6 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_expand_less_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
app:layout_constraintEnd_toStartOf="@+id/save_button_theme_preview_comments_fragment"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
@@ -354,7 +352,6 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
app:layout_constraintStart_toEndOf="@+id/score_text_view_award_background_theme_preview_comments_fragment"
app:layout_constraintEnd_toStartOf="@id/more_button_award_background_theme_preview_comments_fragment"
app:layout_constraintTop_toTopOf="parent"
@@ -385,7 +382,6 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_expand_less_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
app:layout_constraintEnd_toStartOf="@+id/save_button_award_background_theme_preview_comments_fragment"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
diff --git a/app/src/main/res/layout/fragment_theme_preview_posts.xml b/app/src/main/res/layout/fragment_theme_preview_posts.xml
index 7e384540..05c32376 100644
--- a/app/src/main/res/layout/fragment_theme_preview_posts.xml
+++ b/app/src/main/res/layout/fragment_theme_preview_posts.xml
@@ -233,7 +233,7 @@
android:layout_height="150dp"
android:scaleType="center"
android:src="@drawable/ic_link"
- android:tint="@android:color/tab_indicator_text" />
+ app:tint="@android:color/tab_indicator_text" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml
index 4d5ce253..afc779b6 100644
--- a/app/src/main/res/layout/item_comment.xml
+++ b/app/src/main/res/layout/item_comment.xml
@@ -157,7 +157,6 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
app:layout_constraintStart_toEndOf="@+id/score_text_view_item_post_comment"
app:layout_constraintEnd_toStartOf="@id/more_button_item_post_comment"
app:layout_constraintTop_toTopOf="parent"
@@ -186,7 +185,6 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_expand_less_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:visibility="gone"
app:layout_constraintEnd_toStartOf="@+id/save_button_item_post_comment"
app:layout_constraintTop_toTopOf="parent"
diff --git a/app/src/main/res/layout/item_flair.xml b/app/src/main/res/layout/item_flair.xml
index 9d6f1c33..9379800d 100644
--- a/app/src/main/res/layout/item_flair.xml
+++ b/app/src/main/res/layout/item_flair.xml
@@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground">
@@ -23,7 +24,7 @@
android:layout_marginStart="32dp"
android:src="@drawable/ic_outline_edit_24px"
android:visibility="gone"
- android:tint="?attr/primaryTextColor"
+ app:tint="?attr/primaryTextColor"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true" />
diff --git a/app/src/main/res/layout/item_post_compact.xml b/app/src/main/res/layout/item_post_compact.xml
index a5943b69..54f1f34d 100644
--- a/app/src/main/res/layout/item_post_compact.xml
+++ b/app/src/main/res/layout/item_post_compact.xml
@@ -266,7 +266,7 @@
android:layout_height="72dp"
android:scaleType="center"
android:src="@drawable/ic_link"
- android:tint="@android:color/tab_indicator_text" />
+ app:tint="@android:color/tab_indicator_text" />
</FrameLayout>
diff --git a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml
index 0458c12b..92a8c4c5 100644
--- a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml
+++ b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml
@@ -134,7 +134,7 @@
android:layout_height="72dp"
android:scaleType="center"
android:src="@drawable/ic_link"
- android:tint="@android:color/tab_indicator_text" />
+ app:tint="@android:color/tab_indicator_text" />
</FrameLayout>
diff --git a/app/src/main/res/layout/item_post_detail_gallery.xml b/app/src/main/res/layout/item_post_detail_gallery.xml
index 1de319c2..321a7638 100644
--- a/app/src/main/res/layout/item_post_detail_gallery.xml
+++ b/app/src/main/res/layout/item_post_detail_gallery.xml
@@ -254,7 +254,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -280,7 +279,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -308,7 +306,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml
index add4082f..2d3e70f0 100644
--- a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml
+++ b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml
@@ -245,7 +245,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -271,7 +270,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -299,7 +297,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_detail_link.xml b/app/src/main/res/layout/item_post_detail_link.xml
index 27a3f407..9266e19e 100644
--- a/app/src/main/res/layout/item_post_detail_link.xml
+++ b/app/src/main/res/layout/item_post_detail_link.xml
@@ -255,7 +255,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -281,7 +280,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -309,7 +307,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_detail_no_preview_link.xml b/app/src/main/res/layout/item_post_detail_no_preview_link.xml
index 99f5ad0b..7b6d5778 100644
--- a/app/src/main/res/layout/item_post_detail_no_preview_link.xml
+++ b/app/src/main/res/layout/item_post_detail_no_preview_link.xml
@@ -218,7 +218,8 @@
android:layout_width="match_parent"
android:layout_height="150dp"
android:scaleType="center"
- android:src="@drawable/ic_link" />
+ android:src="@drawable/ic_link"
+ app:tint="@android:color/tab_indicator_text" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@@ -231,7 +232,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -257,7 +257,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -285,7 +284,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_detail_text.xml b/app/src/main/res/layout/item_post_detail_text.xml
index 590d4c87..289fdec2 100644
--- a/app/src/main/res/layout/item_post_detail_text.xml
+++ b/app/src/main/res/layout/item_post_detail_text.xml
@@ -214,7 +214,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -240,7 +239,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -268,7 +266,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml
index 7334e1d8..c2c448cb 100644
--- a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml
+++ b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml
@@ -257,7 +257,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -283,7 +282,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -311,7 +309,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay.xml b/app/src/main/res/layout/item_post_detail_video_autoplay.xml
index 200562ad..6f3183b7 100644
--- a/app/src/main/res/layout/item_post_detail_video_autoplay.xml
+++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml
@@ -227,7 +227,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_upward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -253,7 +252,6 @@
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_arrow_downward_grey_24dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
@@ -281,7 +279,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
- android:tint="@android:color/tab_indicator_text"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true"
diff --git a/app/src/main/res/layout/item_post_gallery.xml b/app/src/main/res/layout/item_post_gallery.xml
index de750751..c0b29287 100644
--- a/app/src/main/res/layout/item_post_gallery.xml
+++ b/app/src/main/res/layout/item_post_gallery.xml
@@ -244,7 +244,7 @@
android:layout_height="150dp"
android:scaleType="center"
android:src="@drawable/ic_link"
- android:tint="@android:color/tab_indicator_text"
+ app:tint="@android:color/tab_indicator_text"
android:visibility="gone" />
<androidx.constraintlayout.widget.ConstraintLayout
diff --git a/app/src/main/res/layout/item_post_no_preview_link.xml b/app/src/main/res/layout/item_post_no_preview_link.xml
index c7d6861b..0c56da7e 100644
--- a/app/src/main/res/layout/item_post_no_preview_link.xml
+++ b/app/src/main/res/layout/item_post_no_preview_link.xml
@@ -213,7 +213,7 @@
android:layout_height="150dp"
android:scaleType="center"
android:src="@drawable/ic_link"
- android:tint="@android:color/tab_indicator_text" />
+ app:tint="@android:color/tab_indicator_text" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_constraint_layout_item_post_no_preview_link_type"