removed saveinstanceState and padding in bottom_sheet_menu_base
This commit is contained in:
parent
6866288068
commit
88e13ebe11
2 changed files with 7 additions and 18 deletions
|
@ -27,7 +27,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/bottom_sheet_content_padding_small"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<View
|
||||
|
|
|
@ -28,17 +28,13 @@ public class WikipediaArticleWikiLinkFragment extends MenuBottomSheetDialogFragm
|
|||
|
||||
@Override
|
||||
public void createMenuItems(Bundle savedInstanceState) {
|
||||
Context ctx = getContext();
|
||||
final Context ctx = getContext();
|
||||
if (ctx == null) {
|
||||
return;
|
||||
}
|
||||
if (savedInstanceState != null) {
|
||||
articleUrl = savedInstanceState.getString(ARTICLE_URL_KEY);
|
||||
} else {
|
||||
Bundle args = getArguments();
|
||||
if (args != null) {
|
||||
articleUrl = args.getString(ARTICLE_URL_KEY);
|
||||
}
|
||||
Bundle args = getArguments();
|
||||
if (args != null) {
|
||||
articleUrl = args.getString(ARTICLE_URL_KEY);
|
||||
}
|
||||
|
||||
BaseBottomSheetItem wikiLinkitem = new BottomSheetItemWithDescription.Builder()
|
||||
|
@ -47,7 +43,7 @@ public class WikipediaArticleWikiLinkFragment extends MenuBottomSheetDialogFragm
|
|||
.setLayoutId(R.layout.bottom_sheet_item_title_with_descr)
|
||||
.create();
|
||||
items.add(wikiLinkitem);
|
||||
items.add(new TitleDividerItem(getContext()));
|
||||
items.add(new TitleDividerItem(ctx));
|
||||
|
||||
Drawable osmandLiveIcon = getIcon(R.drawable.ic_action_subscription_osmand_live, 0);
|
||||
|
||||
|
@ -62,14 +58,14 @@ public class WikipediaArticleWikiLinkFragment extends MenuBottomSheetDialogFragm
|
|||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
WikipediaDialogFragment.showFullArticle(getContext(), Uri.parse(articleUrl), nightMode);
|
||||
WikipediaDialogFragment.showFullArticle(ctx, Uri.parse(articleUrl), nightMode);
|
||||
dismiss();
|
||||
}
|
||||
})
|
||||
.create();
|
||||
items.add(wikiArticleOnlineItem);
|
||||
|
||||
items.add(new DividerHalfItem(getContext()));
|
||||
items.add(new DividerHalfItem(ctx));
|
||||
|
||||
BaseBottomSheetItem wikiArticleOfflineItem = new BottomSheetItemWithDescription.Builder()
|
||||
.setDescription(getString(R.string.read_wikipedia_offline_description))
|
||||
|
@ -90,12 +86,6 @@ public class WikipediaArticleWikiLinkFragment extends MenuBottomSheetDialogFragm
|
|||
items.add(wikiArticleOfflineItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putString(ARTICLE_URL_KEY, articleUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDismissButtonTextId() {
|
||||
return R.string.shared_string_close;
|
||||
|
|
Loading…
Reference in a new issue