Add URL in app picker
This commit is contained in:
parent
55d49c7249
commit
99f96125ff
|
@ -25,6 +25,7 @@ import android.view.View;
|
|||
import android.widget.Button;
|
||||
import android.widget.GridView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
@ -97,11 +98,14 @@ public class AppsPickerActivity extends Activity {
|
|||
}
|
||||
appPickers.add(appPicker);
|
||||
packages.add(packageName);
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
|
||||
}
|
||||
String defaultApp = new DefaultAppDAO(AppsPickerActivity.this, db).getDefault(packages);
|
||||
|
||||
TextView urlText = findViewById(R.id.url);
|
||||
urlText.setText(url);
|
||||
|
||||
if (defaultApp != null) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
|
|
|
@ -40,7 +40,17 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:padding="2dp"
|
||||
android:id="@+id/url"
|
||||
android:textSize="12sp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<TextView
|
||||
android:id="@+id/indication"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -51,11 +61,11 @@
|
|||
android:drawableLeft="@drawable/ic_app_logo"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/continue_with"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/url" />
|
||||
|
||||
<GridView
|
||||
android:id="@+id/app_list"
|
||||
|
|
Loading…
Reference in New Issue