mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-04 03:43:55 +01:00
Made operations available without debug mode
This commit is contained in:
@@ -281,9 +281,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||||||
|
|
||||||
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
|
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
|
||||||
|
|
||||||
if (PreferenceManager.getDefaultSharedPreferences(ActivityView.this).getBoolean("debug", false))
|
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_list_24, R.string.menu_operations));
|
||||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_list_24, R.string.menu_operations));
|
|
||||||
|
|
||||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_help_24, R.string.menu_legend));
|
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_help_24, R.string.menu_legend));
|
||||||
|
|
||||||
if (getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
if (getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
||||||
|
|||||||
@@ -22,16 +22,17 @@ package eu.faircode.email;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.format.DateUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import org.json.JSONArray;
|
||||||
import java.text.SimpleDateFormat;
|
import org.json.JSONException;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -45,16 +46,14 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
private Context context;
|
private Context context;
|
||||||
private LifecycleOwner owner;
|
private LifecycleOwner owner;
|
||||||
|
|
||||||
private List<EntityOperation> all = new ArrayList<>();
|
private List<TupleOperationEx> all = new ArrayList<>();
|
||||||
private List<EntityOperation> filtered = new ArrayList<>();
|
private List<TupleOperationEx> filtered = new ArrayList<>();
|
||||||
|
|
||||||
private DateFormat df = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.SHORT, SimpleDateFormat.LONG);
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
|
||||||
private View itemView;
|
private View itemView;
|
||||||
|
private TextView tvFolder;
|
||||||
private TextView tvMessage;
|
private TextView tvMessage;
|
||||||
private TextView tvName;
|
private TextView tvOperation;
|
||||||
private TextView tvArgs;
|
|
||||||
private TextView tvTime;
|
private TextView tvTime;
|
||||||
private TextView tvError;
|
private TextView tvError;
|
||||||
|
|
||||||
@@ -62,16 +61,15 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
this.itemView = itemView;
|
this.itemView = itemView;
|
||||||
|
tvFolder = itemView.findViewById(R.id.tvFolder);
|
||||||
tvMessage = itemView.findViewById(R.id.tvMessage);
|
tvMessage = itemView.findViewById(R.id.tvMessage);
|
||||||
tvName = itemView.findViewById(R.id.tvName);
|
tvOperation = itemView.findViewById(R.id.tvOperation);
|
||||||
tvArgs = itemView.findViewById(R.id.tvArgs);
|
|
||||||
tvTime = itemView.findViewById(R.id.tvTime);
|
tvTime = itemView.findViewById(R.id.tvTime);
|
||||||
tvError = itemView.findViewById(R.id.tvError);
|
tvError = itemView.findViewById(R.id.tvError);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void wire() {
|
private void wire() {
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
itemView.setOnLongClickListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unwire() {
|
private void unwire() {
|
||||||
@@ -79,11 +77,21 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
itemView.setOnLongClickListener(null);
|
itemView.setOnLongClickListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindTo(EntityOperation operation) {
|
private void bindTo(TupleOperationEx operation) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(operation.name);
|
||||||
|
try {
|
||||||
|
JSONArray jarray = new JSONArray(operation.args);
|
||||||
|
if (jarray.length() > 0)
|
||||||
|
sb.append(' ').append(operation.args);
|
||||||
|
} catch (JSONException ex) {
|
||||||
|
sb.append(' ').append(ex.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
tvFolder.setText(operation.accountName + "/" + operation.folderName);
|
||||||
tvMessage.setText(operation.message == null ? null : Long.toString(operation.message));
|
tvMessage.setText(operation.message == null ? null : Long.toString(operation.message));
|
||||||
tvName.setText(operation.name);
|
tvOperation.setText(sb.toString());
|
||||||
tvArgs.setText(operation.args);
|
tvTime.setText(DateUtils.getRelativeTimeSpanString(context, operation.created));
|
||||||
tvTime.setText(df.format(new Date(operation.created)));
|
|
||||||
tvError.setText(operation.error);
|
tvError.setText(operation.error);
|
||||||
tvError.setVisibility(operation.error == null ? View.GONE : View.VISIBLE);
|
tvError.setVisibility(operation.error == null ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
@@ -94,7 +102,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
if (pos == RecyclerView.NO_POSITION)
|
if (pos == RecyclerView.NO_POSITION)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EntityOperation operation = filtered.get(pos);
|
TupleOperationEx operation = filtered.get(pos);
|
||||||
if (operation.message == null) {
|
if (operation.message == null) {
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putLong("id", operation.folder);
|
args.putLong("id", operation.folder);
|
||||||
@@ -139,33 +147,6 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
}.load(context, owner, args);
|
}.load(context, owner, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onLongClick(View view) {
|
|
||||||
int pos = getAdapterPosition();
|
|
||||||
if (pos == RecyclerView.NO_POSITION)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
EntityOperation operation = filtered.get(pos);
|
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
args.putLong("id", operation.id);
|
|
||||||
|
|
||||||
new SimpleTask<Void>() {
|
|
||||||
@Override
|
|
||||||
protected Void onLoad(Context context, Bundle args) {
|
|
||||||
DB.getInstance(context).operation().deleteOperation(args.getLong("id"));
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onException(Bundle args, Throwable ex) {
|
|
||||||
Helper.unexpectedError(context, owner, ex);
|
|
||||||
}
|
|
||||||
}.load(context, owner, args);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AdapterOperation(Context context, LifecycleOwner owner) {
|
AdapterOperation(Context context, LifecycleOwner owner) {
|
||||||
@@ -174,7 +155,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
setHasStableIds(true);
|
setHasStableIds(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set(@NonNull List<EntityOperation> operations) {
|
public void set(@NonNull List<TupleOperationEx> operations) {
|
||||||
Log.i(Helper.TAG, "Set operations=" + operations.size());
|
Log.i(Helper.TAG, "Set operations=" + operations.size());
|
||||||
|
|
||||||
all = operations;
|
all = operations;
|
||||||
@@ -209,10 +190,10 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class MessageDiffCallback extends DiffUtil.Callback {
|
private class MessageDiffCallback extends DiffUtil.Callback {
|
||||||
private List<EntityOperation> prev;
|
private List<TupleOperationEx> prev;
|
||||||
private List<EntityOperation> next;
|
private List<TupleOperationEx> next;
|
||||||
|
|
||||||
MessageDiffCallback(List<EntityOperation> prev, List<EntityOperation> next) {
|
MessageDiffCallback(List<TupleOperationEx> prev, List<TupleOperationEx> next) {
|
||||||
this.prev = prev;
|
this.prev = prev;
|
||||||
this.next = next;
|
this.next = next;
|
||||||
}
|
}
|
||||||
@@ -229,15 +210,15 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
|
public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
|
||||||
EntityOperation a1 = prev.get(oldItemPosition);
|
TupleOperationEx a1 = prev.get(oldItemPosition);
|
||||||
EntityOperation a2 = next.get(newItemPosition);
|
TupleOperationEx a2 = next.get(newItemPosition);
|
||||||
return a1.id.equals(a2.id);
|
return a1.id.equals(a2.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
|
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
|
||||||
EntityOperation a1 = prev.get(oldItemPosition);
|
TupleOperationEx a1 = prev.get(oldItemPosition);
|
||||||
EntityOperation a2 = next.get(newItemPosition);
|
TupleOperationEx a2 = next.get(newItemPosition);
|
||||||
return a1.equals(a2);
|
return a1.equals(a2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,7 +243,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
holder.unwire();
|
holder.unwire();
|
||||||
|
|
||||||
EntityOperation operation = filtered.get(position);
|
TupleOperationEx operation = filtered.get(position);
|
||||||
holder.bindTo(operation);
|
holder.bindTo(operation);
|
||||||
|
|
||||||
holder.wire();
|
holder.wire();
|
||||||
|
|||||||
@@ -38,8 +38,12 @@ public interface DaoOperation {
|
|||||||
", id")
|
", id")
|
||||||
List<EntityOperation> getOperationsByFolder(long folder, boolean outbox);
|
List<EntityOperation> getOperationsByFolder(long folder, boolean outbox);
|
||||||
|
|
||||||
@Query("SELECT * FROM operation ORDER BY id")
|
@Query("SELECT operation.*, account.name AS accountName, folder.name AS folderName" +
|
||||||
LiveData<List<EntityOperation>> liveOperations();
|
" FROM operation" +
|
||||||
|
" JOIN folder ON folder.id = operation.folder" +
|
||||||
|
" JOIN account ON account.id = folder.account" +
|
||||||
|
" ORDER BY operation.id")
|
||||||
|
LiveData<List<TupleOperationEx>> liveOperations();
|
||||||
|
|
||||||
@Query("SELECT * FROM operation WHERE folder = :folder ORDER BY id")
|
@Query("SELECT * FROM operation WHERE folder = :folder ORDER BY id")
|
||||||
LiveData<List<EntityOperation>> liveOperations(long folder);
|
LiveData<List<EntityOperation>> liveOperations(long folder);
|
||||||
@@ -47,6 +51,9 @@ public interface DaoOperation {
|
|||||||
@Query("SELECT * FROM operation ORDER BY id")
|
@Query("SELECT * FROM operation ORDER BY id")
|
||||||
List<EntityOperation> getOperations();
|
List<EntityOperation> getOperations();
|
||||||
|
|
||||||
|
@Query("SELECT * FROM operation ORDER BY id LIMIT 1")
|
||||||
|
EntityOperation getOperationFirst();
|
||||||
|
|
||||||
@Query("SELECT COUNT(id) FROM operation" +
|
@Query("SELECT COUNT(id) FROM operation" +
|
||||||
" WHERE folder = :folder" +
|
" WHERE folder = :folder" +
|
||||||
" AND (:name IS NULL OR operation.name = :name)")
|
" AND (:name IS NULL OR operation.name = :name)")
|
||||||
|
|||||||
@@ -19,8 +19,15 @@ package eu.faircode.email;
|
|||||||
Copyright 2018 by Marcel Bokhorst (M66B)
|
Copyright 2018 by Marcel Bokhorst (M66B)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
@@ -46,6 +53,7 @@ public class FragmentOperations extends FragmentEx {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
setSubtitle(R.string.menu_operations);
|
setSubtitle(R.string.menu_operations);
|
||||||
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
View view = inflater.inflate(R.layout.fragment_operations, container, false);
|
View view = inflater.inflate(R.layout.fragment_operations, container, false);
|
||||||
|
|
||||||
@@ -75,9 +83,9 @@ public class FragmentOperations extends FragmentEx {
|
|||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
// Observe folders
|
// Observe folders
|
||||||
DB.getInstance(getContext()).operation().liveOperations().observe(getViewLifecycleOwner(), new Observer<List<EntityOperation>>() {
|
DB.getInstance(getContext()).operation().liveOperations().observe(getViewLifecycleOwner(), new Observer<List<TupleOperationEx>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable List<EntityOperation> operations) {
|
public void onChanged(@Nullable List<TupleOperationEx> operations) {
|
||||||
if (operations == null)
|
if (operations == null)
|
||||||
operations = new ArrayList<>();
|
operations = new ArrayList<>();
|
||||||
|
|
||||||
@@ -88,4 +96,58 @@ public class FragmentOperations extends FragmentEx {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
|
inflater.inflate(R.menu.menu_operations, menu);
|
||||||
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPrepareOptionsMenu(Menu menu) {
|
||||||
|
PackageManager pm = getContext().getPackageManager();
|
||||||
|
menu.findItem(R.id.menu_help).setVisible(getFAQIntent().resolveActivity(pm) != null);
|
||||||
|
super.onPrepareOptionsMenu(menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
switch (item.getItemId()) {
|
||||||
|
case R.id.menu_help:
|
||||||
|
onMenuHelp();
|
||||||
|
return true;
|
||||||
|
case R.id.menu_delete:
|
||||||
|
onMenuDelete();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onMenuHelp() {
|
||||||
|
startActivity(getFAQIntent());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onMenuDelete() {
|
||||||
|
new SimpleTask<Void>() {
|
||||||
|
@Override
|
||||||
|
protected Void onLoad(Context context, Bundle args) {
|
||||||
|
DB db = DB.getInstance(context);
|
||||||
|
EntityOperation operation = db.operation().getOperationFirst();
|
||||||
|
if (operation != null) {
|
||||||
|
if (operation.message != null)
|
||||||
|
db.message().setMessageUiHide(operation.message, false);
|
||||||
|
db.operation().deleteOperation(operation.id);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}.load(this, new Bundle());
|
||||||
|
}
|
||||||
|
|
||||||
|
private Intent getFAQIntent() {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
|
intent.setData(Uri.parse("https://github.com/M66B/open-source-email/blob/master/FAQ.md#user-content-faq3"));
|
||||||
|
return intent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
app/src/main/java/eu/faircode/email/TupleOperationEx.java
Normal file
36
app/src/main/java/eu/faircode/email/TupleOperationEx.java
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package eu.faircode.email;
|
||||||
|
|
||||||
|
/*
|
||||||
|
This file is part of FairEmail.
|
||||||
|
|
||||||
|
FairEmail is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
FairEmail is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Copyright 2018 by Marcel Bokhorst (M66B)
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class TupleOperationEx extends EntityOperation {
|
||||||
|
public String accountName;
|
||||||
|
public String folderName;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (obj instanceof TupleOperationEx) {
|
||||||
|
TupleOperationEx other = (TupleOperationEx) obj;
|
||||||
|
return (super.equals(obj) &&
|
||||||
|
(this.accountName == null ? other.accountName == null : accountName.equals(other.accountName)) &&
|
||||||
|
(this.folderName == null ? other.folderName == null : this.folderName.equals(other.folderName)));
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,35 +7,39 @@
|
|||||||
android:layout_marginBottom="3dp">
|
android:layout_marginBottom="3dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvMessage"
|
android:id="@+id/tvFolder"
|
||||||
android:layout_width="50dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="6dp"
|
android:ellipsize="start"
|
||||||
android:text="Msg#"
|
android:singleLine="true"
|
||||||
|
android:text="Folder"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvName"
|
android:id="@+id/tvMessage"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="60dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="6dp"
|
android:layout_marginStart="6dp"
|
||||||
android:text="Name"
|
android:gravity="end"
|
||||||
|
android:text="1234567"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintStart_toEndOf="@id/tvMessage"
|
app:layout_constraintStart_toEndOf="@id/tvFolder"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvArgs"
|
android:id="@+id/tvOperation"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="6dp"
|
android:layout_marginStart="6dp"
|
||||||
android:layout_marginEnd="6dp"
|
android:layout_marginEnd="6dp"
|
||||||
android:text="Arguments"
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="Name"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/tvTime"
|
app:layout_constraintEnd_toStartOf="@+id/tvTime"
|
||||||
app:layout_constraintStart_toEndOf="@id/tvName"
|
app:layout_constraintStart_toEndOf="@id/tvMessage"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -65,6 +69,6 @@
|
|||||||
android:textColor="?attr/colorWarning"
|
android:textColor="?attr/colorWarning"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/tvName"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
14
app/src/main/res/menu/menu_operations.xml
Normal file
14
app/src/main/res/menu/menu_operations.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_help"
|
||||||
|
android:icon="@drawable/baseline_info_24"
|
||||||
|
android:title=""
|
||||||
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_delete"
|
||||||
|
android:title="@string/title_delete"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
</menu>
|
||||||
Reference in New Issue
Block a user