mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 03:05:31 +00:00
Added contact groups help
This commit is contained in:
parent
dfc68e60f6
commit
80c5e3ddf3
4 changed files with 71 additions and 38 deletions
|
@ -6610,16 +6610,28 @@ public class FragmentCompose extends FragmentBase {
|
|||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
final long working = getArguments().getLong("working");
|
||||
int focussed = getArguments().getInt("focussed");
|
||||
final Bundle args = getArguments();
|
||||
final long working = args.getLong("working");
|
||||
int focussed = args.getInt("focussed");
|
||||
|
||||
final Context context = getContext();
|
||||
final PackageManager pm = context.getPackageManager();
|
||||
final ContentResolver resolver = context.getContentResolver();
|
||||
|
||||
View dview = LayoutInflater.from(context).inflate(R.layout.dialog_contact_group, null);
|
||||
final ImageButton ibInfo = dview.findViewById(R.id.ibInfo);
|
||||
final Spinner spGroup = dview.findViewById(R.id.spGroup);
|
||||
final Spinner spTarget = dview.findViewById(R.id.spTarget);
|
||||
final Button btnManage = dview.findViewById(R.id.btnManage);
|
||||
|
||||
String[] projection = new String[]{
|
||||
ibInfo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Helper.view(v.getContext(), Uri.parse(Helper.URI_SUPPORT_CONTACT_GROUP), true);
|
||||
}
|
||||
});
|
||||
|
||||
final String[] projection = new String[]{
|
||||
ContactsContract.Groups._ID,
|
||||
ContactsContract.Groups.TITLE,
|
||||
ContactsContract.Groups.SUMMARY_COUNT,
|
||||
|
@ -6629,7 +6641,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
Cursor groups;
|
||||
try {
|
||||
groups = context.getContentResolver().query(
|
||||
groups = resolver.query(
|
||||
ContactsContract.Groups.CONTENT_SUMMARY_URI,
|
||||
projection,
|
||||
// ContactsContract.Groups.GROUP_VISIBLE + " = 1" + " AND " +
|
||||
|
|
|
@ -71,8 +71,6 @@ import java.util.regex.Matcher;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
public class FragmentDialogOpenLink extends FragmentDialogBase {
|
||||
private static final String URI_RESET_OPEN = "https://support.google.com/pixelphone/answer/6271667";
|
||||
|
||||
private ImageButton ibMore;
|
||||
private TextView tvMore;
|
||||
private Button btnOwner;
|
||||
|
@ -383,8 +381,8 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
tvReset.setPaintFlags(tvReset.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvReset.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Helper.view(view.getContext(), Uri.parse(URI_RESET_OPEN), true);
|
||||
public void onClick(View c) {
|
||||
Helper.view(c.getContext(), Uri.parse(Helper.URI_SUPPORT_RESET_OPEN), true);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -171,6 +171,8 @@ public class Helper {
|
|||
static final String GRAVATAR_PRIVACY_URI = "https://en.wikipedia.org/wiki/Gravatar";
|
||||
static final String LICENSE_URI = "https://www.gnu.org/licenses/gpl-3.0.html";
|
||||
static final String DONTKILL_URI = "https://dontkillmyapp.com/";
|
||||
static final String URI_SUPPORT_RESET_OPEN = "https://support.google.com/pixelphone/answer/6271667";
|
||||
static final String URI_SUPPORT_CONTACT_GROUP = "https://support.google.com/contacts/answer/30970";
|
||||
|
||||
// https://developer.android.com/distribute/marketing-tools/linking-to-google-play#PerformingSearch
|
||||
private static final String PLAY_STORE_SEARCH = "https://play.google.com/store/search";
|
||||
|
|
|
@ -1,37 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<eu.faircode.email.ScrollViewEx xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="24dp">
|
||||
android:padding="24dp"
|
||||
android:scrollbarStyle="outsideOverlay">
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/twotone_people_24"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/title_insert_contact_group"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spTarget"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:entries="@array/targetNames"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvGroup" />
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/twotone_people_24"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/title_insert_contact_group"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibInfo"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/spTarget" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/ibInfo"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/title_info"
|
||||
android:padding="6dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:tooltipText="@string/title_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/twotone_info_24"
|
||||
app:tint="?attr/colorAccent" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spTarget"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:entries="@array/targetNames"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvGroup" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/spTarget" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ScrollViewEx>
|
||||
|
|
Loading…
Reference in a new issue