/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
android/src/com/mapswithme/maps/ugc/UGCEditorActivity.java
54 строки
2 KB
velichkomarija
[android] Remove MwmApplication.get() from ThemeUtils.
04 дек 2020, 10:58
04 дек 2020, 10:58
a8dfa28
Код
Авторство
О чём код?
package com.mapswithme.maps.ugc; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.StyleRes; import androidx.fragment.app.Fragment; import com.mapswithme.maps.base.BaseMwmFragmentActivity; import com.mapswithme.maps.metrics.UserActionsLogger; import com.mapswithme.util.ThemeUtils; import com.mapswithme.util.statistics.Statistics; public class UGCEditorActivity extends BaseMwmFragmentActivity { public static void start(@NonNull Activity activity, @NonNull EditParams params) { Statistics.INSTANCE.trackUGCStart(false, params.isFromPP(), params.isFromNotification()); UserActionsLogger.logUgcEditorOpened(); final Intent i = new Intent(activity, UGCEditorActivity.class); Bundle args = new Bundle(); args.putParcelable(UGCEditorFragment.ARG_FEATURE_ID, params.getFeatureId()); args.putString(UGCEditorFragment.ARG_TITLE, params.getTitle()); args.putInt(UGCEditorFragment.ARG_DEFAULT_RATING, params.getDefaultRating()); args.putParcelableArrayList(UGCEditorFragment.ARG_RATING_LIST, params.getRatings()); args.putBoolean(UGCEditorFragment.ARG_CAN_BE_REVIEWED, params.canBeReviewed()); args.putDouble(UGCEditorFragment.ARG_LAT, params.getLat()); args.putDouble(UGCEditorFragment.ARG_LON, params.getLon()); args.putString(UGCEditorFragment.ARG_ADDRESS, params.getAddress()); i.putExtras(args); activity.startActivity(i); } @Override @StyleRes public int getThemeResourceId(@NonNull String theme) { return ThemeUtils.getCardBgThemeResourceId(getApplicationContext(), theme); } @Override protected Class<? extends Fragment> getFragmentClass() { return UGCEditorFragment.class; } @Override public void onBackPressed() { Statistics.INSTANCE.trackEvent(Statistics.EventName.UGC_REVIEW_CANCEL); super.onBackPressed(); } }