Update file attachment control

pull/322/merge
Alex Baker 9 years ago
parent 8e12bbdd33
commit 0f4785e421

@ -26,8 +26,6 @@ import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
import android.view.WindowManager;
import android.webkit.MimeTypeMap;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
@ -402,7 +400,7 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
controls.add(timerControl);
controlSetMap.put(getString(R.string.TEA_ctrl_timer_pref), timerControl);
filesControlSet = new FilesControlSet(preferences, taskAttachmentDao, getActivity(), dialogBuilder);
filesControlSet = new FilesControlSet(preferences, taskAttachmentDao, this, deviceInfo, actFmCameraModule);
controls.add(filesControlSet);
controlSetMap.put(getString(R.string.TEA_ctrl_files_pref), filesControlSet);
@ -560,9 +558,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
loadItem(intent);
synchronized (controls) {
if (!taskAttachmentDao.taskHasAttachments(model.getUuid())) {
filesControlSet.getView().setVisibility(View.GONE);
}
for (TaskEditControlSet controlSet : controls) {
controlSet.readFromTask(model);
}
@ -731,101 +726,23 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
.show();
}
private void startAttachFile() {
final List<Runnable> runnables = new ArrayList<>();
List<String> options = new ArrayList<>();
if (deviceInfo.hasCamera() || deviceInfo.hasGallery()) {
runnables.add(new Runnable() {
@Override
public void run() {
actFmCameraModule.showPictureLauncher(null);
}
});
options.add(getString(R.string.file_add_picture));
}
runnables.add(new Runnable() {
@Override
public void run() {
Intent attachFile = new Intent(getActivity(), FileExplore.class);
startActivityForResult(attachFile, REQUEST_CODE_ATTACH_FILE);
}
});
options.add(getString(R.string.file_add_sdcard));
ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(),
android.R.layout.simple_spinner_dropdown_item, options.toArray(new String[options.size()]));
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface d, int which) {
runnables.get(which).run();
}
};
// show a menu of available options
dialogBuilder.newDialog()
.setAdapter(adapter, listener)
.show()
.setOwnerActivity(getActivity());
}
private void startRecordingAudio() {
Intent recordAudio = new Intent(getActivity(), AACRecordingActivity.class);
startActivityForResult(recordAudio, REQUEST_CODE_RECORD);
}
private void attachFile(String file) {
File src = new File(file);
if (!src.exists()) {
Toast.makeText(getActivity(), R.string.file_err_copy, Toast.LENGTH_LONG).show();
return;
}
File dst = new File(preferences.getAttachmentsDirectory() + File.separator + src.getName());
try {
AndroidUtilities.copyFile(src, dst);
} catch (Exception e) {
log.error(e.getMessage(), e);
Toast.makeText(getActivity(), R.string.file_err_copy, Toast.LENGTH_LONG).show();
return;
}
String path = dst.getAbsolutePath();
String name = dst.getName();
String extension = AndroidUtilities.getFileExtension(name);
String type = TaskAttachment.FILE_TYPE_OTHER;
if (!TextUtils.isEmpty(extension)) {
MimeTypeMap map = MimeTypeMap.getSingleton();
String guessedType = map.getMimeTypeFromExtension(extension);
if (!TextUtils.isEmpty(guessedType)) {
type = guessedType;
}
}
createNewFileAttachment(path, name, type);
}
private void attachImage(Uri uri) {
try {
String path = getPathFromUri(getActivity(), uri);
File file = new File(path);
String extension = path.substring(path.lastIndexOf('.') + 1);
createNewFileAttachment(path, file.getName(), TaskAttachment.FILE_TYPE_IMAGE + extension);
filesControlSet.createNewFileAttachment(path, file.getName(), TaskAttachment.FILE_TYPE_IMAGE + extension);
} catch (Exception e) {
log.error(e.getMessage(), e);
Toast.makeText(getActivity(), R.string.file_err_copy, Toast.LENGTH_LONG).show();
}
}
private void createNewFileAttachment(String path, String fileName, String fileType) {
TaskAttachment attachment = TaskAttachment.createNewAttachment(model.getUuid(), path, fileName, fileType);
taskAttachmentDao.createNew(attachment);
filesControlSet.refreshMetadata();
filesControlSet.getView().setVisibility(View.VISIBLE);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
hideKeyboard();
@ -837,9 +754,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
case R.id.menu_discard:
discardButtonClick();
return true;
case R.id.menu_attach:
startAttachFile();
return true;
case R.id.menu_record_note:
startRecordingAudio();
return true;
@ -928,11 +842,10 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
} else if (requestCode == REQUEST_CODE_RECORD && resultCode == Activity.RESULT_OK) {
String recordedAudioPath = data.getStringExtra(AACRecordingActivity.RESULT_OUTFILE);
String recordedAudioName = data.getStringExtra(AACRecordingActivity.RESULT_FILENAME);
createNewFileAttachment(recordedAudioPath, recordedAudioName, TaskAttachment.FILE_TYPE_AUDIO + "m4a"); //$NON-NLS-1$
filesControlSet.createNewFileAttachment(recordedAudioPath, recordedAudioName, TaskAttachment.FILE_TYPE_AUDIO + "m4a"); //$NON-NLS-1$
} else if (requestCode == REQUEST_CODE_ATTACH_FILE && resultCode == Activity.RESULT_OK) {
attachFile(data.getStringExtra(FileExplore.RESULT_FILE_SELECTED));
filesControlSet.attachFile(data.getStringExtra(FileExplore.RESULT_FILE_SELECTED));
}
actFmCameraModule.activityResult(requestCode, resultCode, data, new CameraResultCallback() {
@Override
public void handleCameraResult(Uri uri) {

@ -158,7 +158,8 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
private final Map<Long, TaskAction> taskActionLoader = Collections.synchronizedMap(new HashMap<Long, TaskAction>());
public TaskAdapter(Context context, ActivityPreferences preferences, TaskAttachmentDao taskAttachmentDao, TaskService taskService, TaskListFragment fragment,
Cursor c, AtomicReference<String> query, OnCompletedTaskListener onCompletedTaskListener, DialogBuilder dialogBuilder) {
Cursor c, AtomicReference<String> query, OnCompletedTaskListener onCompletedTaskListener,
DialogBuilder dialogBuilder) {
super(context, c, false);
this.preferences = preferences;
this.taskAttachmentDao = taskAttachmentDao;
@ -452,8 +453,10 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
}
private void showFilesDialog(Task task) {
FilesControlSet filesControlSet = new FilesControlSet(preferences, taskAttachmentDao,
fragment.getActivity(), dialogBuilder);
FilesControlSet filesControlSet = new FilesControlSet(
preferences, taskAttachmentDao,
fragment, null, null);
filesControlSet.hideAddAttachmentButton();
filesControlSet.readFromTask(task);
filesControlSet.getView().performClick();
}

@ -11,71 +11,104 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.MimeTypeMap;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import android.widget.Toast;
import com.todoroo.andlib.data.Callback;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.astrid.actfm.ActFmCameraModule;
import com.todoroo.astrid.activity.TaskEditFragment;
import com.todoroo.astrid.dao.TaskAttachmentDao;
import com.todoroo.astrid.data.RemoteModel;
import com.todoroo.astrid.data.SyncFlags;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.TaskAttachment;
import com.todoroo.astrid.ui.PopupControlSet;
import com.todoroo.astrid.helper.TaskEditControlSetBase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tasks.R;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.preferences.ActivityPreferences;
import org.tasks.preferences.DeviceInfo;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class FilesControlSet extends PopupControlSet {
public class FilesControlSet extends TaskEditControlSetBase {
private static final Logger log = LoggerFactory.getLogger(FilesControlSet.class);
private final ArrayList<TaskAttachment> files = new ArrayList<>();
private final LinearLayout fileDisplayList;
private final LayoutInflater inflater;
private ActivityPreferences preferences;
private final TaskAttachmentDao taskAttachmentDao;
private final Fragment fragment;
private final DeviceInfo deviceInfo;
private final ActFmCameraModule actFmCameraModule;
private final DialogBuilder dialogBuilder;
private LinearLayout attachmentContainer;
private TextView addAttachment;
public FilesControlSet(ActivityPreferences preferences, TaskAttachmentDao taskAttachmentDao,
FragmentActivity activity, DialogBuilder dialogBuilder) {
super(preferences, activity, R.layout.control_set_files_dialog, R.layout.control_set_files, R.string.TEA_control_files, dialogBuilder);
Fragment fragment, DeviceInfo deviceInfo, ActFmCameraModule actFmCameraModule) {
super(fragment.getActivity(), R.layout.control_set_files);
this.preferences = preferences;
this.taskAttachmentDao = taskAttachmentDao;
this.fragment = fragment;
this.deviceInfo = deviceInfo;
this.actFmCameraModule = actFmCameraModule;
this.dialogBuilder = new DialogBuilder(activity, preferences);
fileDisplayList = (LinearLayout) getView().findViewById(R.id.files_list);
inflater = (LayoutInflater) activity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
}
@Override
protected void refreshDisplayView() {
fileDisplayList.removeAllViews();
for (final TaskAttachment m : files) {
View fileRow = inflater.inflate(R.layout.file_display_row, null);
LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
setUpFileRow(m, fileRow, fileDisplayList, lp);
}
private void addAttachment(TaskAttachment taskAttachment) {
View fileRow = inflater.inflate(R.layout.file_row, null);
fileRow.setTag(taskAttachment);
attachmentContainer.addView(fileRow);
addAttachment(taskAttachment, fileRow);
}
@Override
public void readFromTask(Task task) {
super.readFromTask(task);
refreshMetadata();
refreshDisplayView();
private void addAttachment(final TaskAttachment taskAttachment, final View fileRow) {
TextView nameView = (TextView) fileRow.findViewById(R.id.file_text);
nameView.setTextColor(themeColor);
String name = taskAttachment.getName();
nameView.setText(name);
nameView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showFile(taskAttachment);
}
});
View clearFile = fileRow.findViewById(R.id.remove_file);
clearFile.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.newMessageDialog(R.string.premium_remove_file_confirm)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
taskAttachmentDao.delete(taskAttachment.getId());
if (taskAttachment.containsNonNullValue(TaskAttachment.FILE_PATH)) {
File f = new File(taskAttachment.getFilePath());
f.delete();
}
files.remove(taskAttachment);
attachmentContainer.removeView(fileRow);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
});
}
@Override
@ -112,12 +145,18 @@ public class FilesControlSet extends PopupControlSet {
i--;
}
}
}
}
@Override
protected void readFromTaskOnInitialize() {
attachmentContainer.removeAllViews();
taskAttachmentDao.getAttachments(model.getUuid(), new Callback<TaskAttachment>() {
@Override
public void apply(TaskAttachment entry) {
addAttachment(entry);
}
});
}
@Override
@ -127,54 +166,18 @@ public class FilesControlSet extends PopupControlSet {
@Override
protected void afterInflate() {
LinearLayout fileList = (LinearLayout) getDialogView().findViewById(R.id.files_list);
final LinearLayout finalList = fileList;
fileList.removeAllViews();
LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
for (final TaskAttachment m : files) {
final View fileRow = inflater.inflate(R.layout.file_row, null);
setUpFileRow(m, fileRow, fileList, lp);
View name = fileRow.findViewById(R.id.file_text);
View clearFile = fileRow.findViewById(R.id.remove_file);
name.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showFile(m);
}
});
attachmentContainer = (LinearLayout) getView().findViewById(R.id.attachment_container);
addAttachment = (TextView) getView().findViewById(R.id.add_attachment);
addAttachment.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startAttachFile();
}
});
}
clearFile.setVisibility(View.VISIBLE);
clearFile.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.newMessageDialog(R.string.premium_remove_file_confirm)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (RemoteModel.isValidUuid(m.getUUID())) {
// TODO: delete
m.setDeletedAt(DateUtilities.now());
taskAttachmentDao.saveExisting(m);
} else {
taskAttachmentDao.delete(m.getId());
}
if (m.containsNonNullValue(TaskAttachment.FILE_PATH)) {
File f = new File(m.getFilePath());
f.delete();
}
files.remove(m);
refreshDisplayView();
finalList.removeView(fileRow);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
});
}
public void hideAddAttachmentButton() {
addAttachment.setVisibility(View.GONE);
}
public interface PlaybackExceptionHandler {
@ -206,9 +209,14 @@ public class FilesControlSet extends PopupControlSet {
}
});
} else if (fileType.startsWith(TaskAttachment.FILE_TYPE_IMAGE)) {
activity.startActivity(new Intent(Intent.ACTION_VIEW) {{
setDataAndType(Uri.fromFile(new File(filePath)), fileType);
}});
try {
activity.startActivity(new Intent(Intent.ACTION_VIEW) {{
setDataAndType(Uri.fromFile(new File(filePath)), fileType);
}});
} catch(ActivityNotFoundException e) {
log.error(e.getMessage(), e);
Toast.makeText(activity, R.string.no_application_found, Toast.LENGTH_SHORT).show();
}
} else {
String useType = fileType;
if (fileType.equals(TaskAttachment.FILE_TYPE_OTHER)) {
@ -240,37 +248,83 @@ public class FilesControlSet extends PopupControlSet {
}
}
private void setUpFileRow(TaskAttachment m, View row, LinearLayout parent, LayoutParams lp) {
TextView nameView = (TextView) row.findViewById(R.id.file_text);
nameView.setTextColor(themeColor);
TextView typeView = (TextView) row.findViewById(R.id.file_type);
String name = getNameString(m);
String type = getTypeString(m.getName());
nameView.setText(name);
private void startAttachFile() {
final List<Runnable> runnables = new ArrayList<>();
List<String> options = new ArrayList<>();
if (TextUtils.isEmpty(type)) {
typeView.setVisibility(View.GONE);
} else {
typeView.setText(type);
if (deviceInfo.hasCamera() || deviceInfo.hasGallery()) {
runnables.add(new Runnable() {
@Override
public void run() {
actFmCameraModule.showPictureLauncher(null);
}
});
options.add(activity.getString(R.string.file_add_picture));
}
runnables.add(new Runnable() {
@Override
public void run() {
Intent attachFile = new Intent(activity, FileExplore.class);
fragment.startActivityForResult(attachFile, TaskEditFragment.REQUEST_CODE_ATTACH_FILE);
}
});
options.add(activity.getString(R.string.file_add_sdcard));
ArrayAdapter<String> adapter = new ArrayAdapter<>(
activity,
android.R.layout.simple_spinner_dropdown_item,
options.toArray(new String[options.size()]));
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface d, int which) {
runnables.get(which).run();
}
};
parent.addView(row, lp);
// show a menu of available options
dialogBuilder.newDialog()
.setAdapter(adapter, listener)
.show()
.setOwnerActivity(activity);
}
private String getNameString(TaskAttachment metadata) {
String name = metadata.getName();
int extension = name.lastIndexOf('.');
if (extension < 0) {
return name;
public void attachFile(String file) {
File src = new File(file);
if (!src.exists()) {
Toast.makeText(activity, R.string.file_err_copy, Toast.LENGTH_LONG).show();
return;
}
return name.substring(0, extension);
}
private String getTypeString(String name) {
int extension = name.lastIndexOf('.');
if (extension < 0 || extension + 1 >= name.length()) {
return "";
File dst = new File(preferences.getAttachmentsDirectory() + File.separator + src.getName());
try {
AndroidUtilities.copyFile(src, dst);
} catch (Exception e) {
log.error(e.getMessage(), e);
Toast.makeText(activity, R.string.file_err_copy, Toast.LENGTH_LONG).show();
return;
}
String path = dst.getAbsolutePath();
String name = dst.getName();
String extension = AndroidUtilities.getFileExtension(name);
String type = TaskAttachment.FILE_TYPE_OTHER;
if (!TextUtils.isEmpty(extension)) {
MimeTypeMap map = MimeTypeMap.getSingleton();
String guessedType = map.getMimeTypeFromExtension(extension);
if (!TextUtils.isEmpty(guessedType)) {
type = guessedType;
}
}
return name.substring(extension + 1).toUpperCase();
createNewFileAttachment(path, name, type);
}
public void createNewFileAttachment(String path, String fileName, String fileType) {
TaskAttachment attachment = TaskAttachment.createNewAttachment(model.getUuid(), path, fileName, fileType);
taskAttachmentDao.createNew(attachment);
refreshMetadata();
addAttachment(attachment);
}
}

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="5dip"/>
<solid android:color="#b7b7b7"/>
</shape>

@ -4,11 +4,32 @@
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/files_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="start"
android:orientation="vertical"
android:paddingRight="@dimen/task_edit_padding_right"
android:paddingEnd="@dimen/task_edit_padding_right" />
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/attachment_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="start"
android:layout_weight="50"
android:gravity="start"
android:orientation="horizontal">
<TextView
android:id="@+id/add_attachment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_attachment"
android:textColor="?attr/asTextColorHint"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout>
</LinearLayout>

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="100">
<LinearLayout
android:id="@+id/files_list"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</ScrollView>
</LinearLayout>

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/file_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1"
android:singleLine="true"
android:ellipsize="end"
android:textColor="?attr/asThemeTextColor"
android:textSize="@dimen/task_edit_text_size" />
<TextView
android:id="@+id/file_type"
android:minWidth="37dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/file_type_background"
android:layout_marginLeft="5dip"
android:paddingLeft="4dip"
android:paddingRight="4dip"
android:gravity="center"
android:textColor="?attr/asTextColorInverse"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout>

@ -4,46 +4,33 @@
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:paddingBottom="@dimen/task_edit_double_padding_top_bottom"
android:layout_marginBottom="@dimen/task_edit_double_padding_top_bottom">
<TextView
style="@android:style/TextAppearance"
android:id="@+id/file_text"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:layout_marginTop="5dip"
android:layout_marginBottom="5dip"
android:layout_marginLeft="10dip"
android:paddingRight="5dip"
android:paddingLeft="3dip"
android:layout_weight="1"
android:textColor="?attr/asThemeTextColor"
android:gravity="left|center_vertical"
android:textSize="@dimen/task_edit_text_size" />
<TextView
android:id="@+id/file_type"
android:minWidth="37dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/file_type_background"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:paddingLeft="4dip"
android:paddingRight="4dip"
android:gravity="center"
android:textColor="?attr/asTextColorInverse"
android:textSize="@dimen/task_edit_text_size" />
android:layout_weight="100"
android:textColor="?attr/asTextColor" />
<ImageView
android:id="@+id/remove_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="?attr/icon_tint"
android:src="@drawable/ic_close_24dp"
android:layout_marginLeft="-5dip"
android:layout_marginRight="5dip"
android:visibility="gone" />
android:layout_gravity="center"
android:layout_weight="1"
android:clickable="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:alpha="@dimen/drawer_icon_alpha"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingStart="10dp"
android:src="@drawable/ic_cancel_24dp"
android:tint="?attr/icon_tint" />
</LinearLayout>

@ -8,11 +8,6 @@
android:icon="@drawable/ic_save_24dp"
android:visible="false"
tasks:showAsAction="ifRoom"/>
<item
android:id="@+id/menu_attach"
android:title="@string/premium_attach_file"
android:icon="@drawable/ic_attachment_24dp"
tasks:showAsAction="ifRoom"/>
<item
android:id="@+id/menu_record_note"
android:title="@string/premium_record_audio"

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="premium_attach_file">Attach a file</string>
<string name="premium_record_audio">Record a note</string>
<string name="premium_remove_file_confirm">Are you sure? Cannot be undone</string>

@ -121,6 +121,8 @@
<string name="reverse">Reverse</string>
<string name="task_count">%s Tasks</string>
<string name="get_plugins">Get Plug-ins</string>
<string name="no_application_found">No application found to open attachment</string>
<string name="add_attachment">Add attachment</string>
<string-array name="sync_SPr_interval_entries">
<!-- sync_SPr_interval_entries: Synchronization Intervals -->

Loading…
Cancel
Save