forked from organicmaps/organicmaps
[android] move place page sections in own package
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
9026cfbeb7
commit
c48be8c3f5
10 changed files with 29 additions and 12 deletions
|
@ -15,7 +15,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
class PlacePageUtils
|
||||
public class PlacePageUtils
|
||||
{
|
||||
static void moveViewportUp(@NonNull View placePageView, int viewportMinHeight)
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ class PlacePageUtils
|
|||
}
|
||||
}
|
||||
|
||||
static void copyToClipboard(Context context, View frame, String text)
|
||||
public static void copyToClipboard(Context context, View frame, String text)
|
||||
{
|
||||
Utils.copyTextToClipboard(context, text);
|
||||
Utils.showSnackbarAbove(frame,
|
||||
|
@ -92,7 +92,7 @@ class PlacePageUtils
|
|||
context.getString(R.string.copied_to_clipboard, text));
|
||||
}
|
||||
|
||||
static void showCopyPopup(Context context, View popupAnchor, View frame, List<String> items)
|
||||
public static void showCopyPopup(Context context, View popupAnchor, View frame, List<String> items)
|
||||
{
|
||||
final PopupMenu popup = new PopupMenu(context, popupAnchor);
|
||||
final Menu menu = popup.getMenu();
|
||||
|
|
|
@ -48,6 +48,11 @@ import app.organicmaps.util.StringUtils;
|
|||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.concurrency.UiThread;
|
||||
import app.organicmaps.widget.ArrowView;
|
||||
import app.organicmaps.widget.placepage.sections.PlacePageBookmarkFragment;
|
||||
import app.organicmaps.widget.placepage.sections.PlacePageLinksFragment;
|
||||
import app.organicmaps.widget.placepage.sections.PlacePageOpeningHoursFragment;
|
||||
import app.organicmaps.widget.placepage.sections.PlacePagePhoneFragment;
|
||||
import app.organicmaps.widget.placepage.sections.PlacePageWikipediaFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
@ -26,6 +26,8 @@ import app.organicmaps.bookmarks.data.MapObject;
|
|||
import app.organicmaps.util.StringUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.placepage.EditBookmarkFragment;
|
||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
|
||||
public class PlacePageBookmarkFragment extends Fragment implements View.OnClickListener,
|
||||
View.OnLongClickListener,
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
@ -17,6 +17,8 @@ import app.organicmaps.R;
|
|||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.bookmarks.data.Metadata;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.placepage.PlacePageUtils;
|
||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
|
@ -25,6 +25,9 @@ import app.organicmaps.editor.data.Timetable;
|
|||
import app.organicmaps.util.ThemeUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.placepage.PlacePageUtils;
|
||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
import app.organicmaps.widget.placepage.sections.PlaceOpeningHoursAdapter;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Locale;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
import app.organicmaps.R;
|
||||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.bookmarks.data.Metadata;
|
||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
|
||||
public class PlacePagePhoneFragment extends Fragment implements Observer<MapObject>
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableStringBuilder;
|
||||
|
@ -19,6 +19,9 @@ import app.organicmaps.bookmarks.data.MapObject;
|
|||
import app.organicmaps.bookmarks.data.Metadata;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.widget.placepage.PlaceDescriptionActivity;
|
||||
import app.organicmaps.widget.placepage.PlacePageUtils;
|
||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
|
||||
public class PlacePageWikipediaFragment extends Fragment implements Observer<MapObject>
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
|
@ -1,9 +1,10 @@
|
|||
package app.organicmaps.widget.placepage;
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import app.organicmaps.editor.data.HoursMinutes;
|
||||
import app.organicmaps.editor.data.Timespan;
|
||||
import app.organicmaps.editor.data.Timetable;
|
||||
import app.organicmaps.widget.placepage.PlaceOpeningHoursAdapter.WeekScheduleData;
|
||||
import app.organicmaps.widget.placepage.sections.PlaceOpeningHoursAdapter;
|
||||
import app.organicmaps.widget.placepage.sections.PlaceOpeningHoursAdapter.WeekScheduleData;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
Loading…
Add table
Reference in a new issue