deleted unnecessary methods
This commit is contained in:
parent
3268eb8952
commit
0e4783c758
3 changed files with 3 additions and 22 deletions
|
@ -4,7 +4,6 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.ColorInt;
|
import android.support.annotation.ColorInt;
|
||||||
import android.support.annotation.ColorRes;
|
import android.support.annotation.ColorRes;
|
||||||
import android.support.annotation.DrawableRes;
|
import android.support.annotation.DrawableRes;
|
||||||
import android.support.annotation.LayoutRes;
|
|
||||||
import android.support.annotation.StringRes;
|
import android.support.annotation.StringRes;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -59,18 +58,4 @@ public abstract class BaseTravelCard {
|
||||||
protected void onRightButtonClickAction() {
|
protected void onRightButtonClickAction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ColorRes
|
|
||||||
protected int getBottomDividerColorId() {
|
|
||||||
return DEFAULT_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@LayoutRes
|
|
||||||
protected int getLayoutId() {
|
|
||||||
return DEFAULT_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean isNightMode() {
|
|
||||||
return !app.getSettings().isLightContent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import net.osmand.plus.R;
|
||||||
import net.osmand.plus.dialogs.ChoosePlanDialogFragment;
|
import net.osmand.plus.dialogs.ChoosePlanDialogFragment;
|
||||||
|
|
||||||
public class OpenBetaTravelCard extends BaseTravelCard {
|
public class OpenBetaTravelCard extends BaseTravelCard {
|
||||||
|
|
||||||
private FragmentManager fm;
|
private FragmentManager fm;
|
||||||
|
|
||||||
public OpenBetaTravelCard(OsmandApplication app, FragmentManager fm, boolean nightMode) {
|
public OpenBetaTravelCard(OsmandApplication app, FragmentManager fm, boolean nightMode) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class StartEditingTravelCard extends BaseTravelCard {
|
||||||
public void inflate(OsmandApplication app, ViewGroup container, boolean nightMode) {
|
public void inflate(OsmandApplication app, ViewGroup container, boolean nightMode) {
|
||||||
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
|
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
|
||||||
view = LayoutInflater.from(new ContextThemeWrapper(app, themeRes))
|
view = LayoutInflater.from(new ContextThemeWrapper(app, themeRes))
|
||||||
.inflate(getLayoutId(), container, false);
|
.inflate(R.layout.wikivoyage_start_editing_card, container, false);
|
||||||
ImageView imageView = (ImageView) view.findViewById(R.id.background_image);
|
ImageView imageView = (ImageView) view.findViewById(R.id.background_image);
|
||||||
imageView.setImageDrawable(getIcon(R.drawable.img_help_wikivoyage_contribute));
|
imageView.setImageDrawable(getIcon(R.drawable.img_help_wikivoyage_contribute));
|
||||||
((TextView) view.findViewById(R.id.title)).setText(R.string.start_editing_card_image_text);
|
((TextView) view.findViewById(R.id.title)).setText(R.string.start_editing_card_image_text);
|
||||||
|
@ -60,11 +60,6 @@ public class StartEditingTravelCard extends BaseTravelCard {
|
||||||
return super.getIcon(drawableRes);
|
return super.getIcon(drawableRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getLayoutId() {
|
|
||||||
return R.layout.wikivoyage_start_editing_card;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLeftButtonTextId() {
|
protected int getLeftButtonTextId() {
|
||||||
return R.string.start_editing;
|
return R.string.start_editing;
|
||||||
|
@ -73,7 +68,7 @@ public class StartEditingTravelCard extends BaseTravelCard {
|
||||||
@Override
|
@Override
|
||||||
protected void onLeftButtonClickAction() {
|
protected void onLeftButtonClickAction() {
|
||||||
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
|
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
|
||||||
.setToolbarColor(ContextCompat.getColor(app, isNightMode() ? R.color.actionbar_dark_color : R.color.actionbar_light_color))
|
.setToolbarColor(ContextCompat.getColor(app, nightMode ? R.color.actionbar_dark_color : R.color.actionbar_light_color))
|
||||||
.build();
|
.build();
|
||||||
String text = "https://" + app.getLanguage().toLowerCase() + ".m.wikivoyage.org";
|
String text = "https://" + app.getLanguage().toLowerCase() + ".m.wikivoyage.org";
|
||||||
customTabsIntent.launchUrl(app, Uri.parse(text));
|
customTabsIntent.launchUrl(app, Uri.parse(text));
|
||||||
|
|
Loading…
Reference in a new issue