mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 12:57:12 +01:00
Directly open url without checking available packages in openInBrowser in LinkResolverActivity. Replace android:tint with app:tint.
This commit is contained in:
parent
53ef74b70e
commit
462208066a
@ -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"));
|
||||
|
@ -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"/>
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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" />
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user