forked from organicmaps/organicmaps
[android] Deleted deprecated bookmark ui actions
This commit is contained in:
parent
d335480db1
commit
9e33dddf2a
4 changed files with 2 additions and 34 deletions
|
@ -1,13 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/share_message"
|
||||
android:title="@string/share_by_message"
|
||||
android:icon="@drawable/ic_share_message"/>
|
||||
|
||||
<item android:id="@+id/share_email"
|
||||
android:title="@string/share_by_email"
|
||||
android:icon="@drawable/ic_share_email"/>
|
||||
|
||||
<item android:id="@+id/share"
|
||||
android:title="@string/share"
|
||||
android:icon="@drawable/ic_share"/>
|
||||
|
@ -19,4 +11,4 @@
|
|||
<item android:id="@+id/delete"
|
||||
android:title="@string/delete"
|
||||
android:icon="@drawable/ic_delete"/>
|
||||
</menu>
|
||||
</menu>
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/share_message"
|
||||
android:title="@string/share_by_message"
|
||||
android:icon="@drawable/ic_share_message"/>
|
||||
|
||||
<item android:id="@+id/share_email"
|
||||
android:title="@string/share_by_email"
|
||||
android:icon="@drawable/ic_share_email"/>
|
||||
|
||||
<item android:id="@+id/share"
|
||||
android:title="@string/share"
|
||||
android:icon="@drawable/ic_share"/>
|
||||
|
|
|
@ -180,12 +180,6 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<BookmarkListA
|
|||
BottomSheetHelper.Builder bs = BottomSheetHelper.create(getActivity(), bookmark.getTitle())
|
||||
.sheet(menuResId)
|
||||
.listener(this);
|
||||
if (!ShareOption.SMS.isSupported(getActivity()))
|
||||
bs.getMenu().removeItem(R.id.share_message);
|
||||
|
||||
if (!ShareOption.EMAIL.isSupported(getActivity()))
|
||||
bs.getMenu().removeItem(R.id.share_email);
|
||||
|
||||
bs.tint().show();
|
||||
break;
|
||||
|
||||
|
@ -222,14 +216,6 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<BookmarkListA
|
|||
|
||||
switch (menuItem.getItemId())
|
||||
{
|
||||
case R.id.share_message:
|
||||
ShareOption.SMS.shareMapObject(getActivity(), item, Sponsored.nativeGetCurrent());
|
||||
break;
|
||||
|
||||
case R.id.share_email:
|
||||
ShareOption.EMAIL.shareMapObject(getActivity(), item, Sponsored.nativeGetCurrent());
|
||||
break;
|
||||
|
||||
case R.id.share:
|
||||
ShareOption.ANY.shareMapObject(getActivity(), item, Sponsored.nativeGetCurrent());
|
||||
break;
|
||||
|
|
|
@ -16,8 +16,6 @@ import com.mapswithme.util.statistics.Statistics;
|
|||
|
||||
public abstract class ShareOption
|
||||
{
|
||||
public static final SmsShareOption SMS = new SmsShareOption();
|
||||
public static final EmailShareOption EMAIL = new EmailShareOption();
|
||||
public static final AnyShareOption ANY = new AnyShareOption();
|
||||
|
||||
@StringRes
|
||||
|
@ -93,4 +91,4 @@ public abstract class ShareOption
|
|||
SharingHelper.shareOutside(new TextShareable(activity, body), titleRes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue