|
|
@@ -1,5 +1,8 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.contents;
|
|
|
|
|
|
+import android.content.ActivityNotFoundException;
|
|
|
+import android.content.Intent;
|
|
|
+import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
|
@@ -16,6 +19,7 @@ import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailListBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.SeriesItemBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
+import kr.co.zumo.app.lifeplus.util.AppUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.IEventListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
@@ -33,6 +37,7 @@ import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
public class ContentsDetailFragment extends FragmentBase<ContentsDetailPresenter> implements IContentsDetailView {
|
|
|
|
|
|
private RecyclerView recyclerViewContentsDetail;
|
|
|
+ private ActionBarHelper actionBarHelper;
|
|
|
|
|
|
@Override
|
|
|
protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
@@ -58,6 +63,7 @@ public class ContentsDetailFragment extends FragmentBase<ContentsDetailPresenter
|
|
|
.white()
|
|
|
.transparent()
|
|
|
.show();
|
|
|
+ this.actionBarHelper = actionBarHelper;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -83,6 +89,12 @@ public class ContentsDetailFragment extends FragmentBase<ContentsDetailPresenter
|
|
|
|
|
|
@Override
|
|
|
public void goGooglePlay() {
|
|
|
+ String appPackageName = AppUtil.getPackageName();
|
|
|
+ try {
|
|
|
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
|
|
+ } catch (ActivityNotFoundException e) {
|
|
|
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -93,12 +105,12 @@ public class ContentsDetailFragment extends FragmentBase<ContentsDetailPresenter
|
|
|
|
|
|
@Override
|
|
|
public void setLiked(boolean isChecked) {
|
|
|
-
|
|
|
+ actionBarHelper.setLiked(isChecked);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void setBookmarked(boolean isChecked) {
|
|
|
-
|
|
|
+ actionBarHelper.setBookmarked(isChecked);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -118,7 +130,6 @@ public class ContentsDetailFragment extends FragmentBase<ContentsDetailPresenter
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-
|
|
|
recyclerViewContentsDetail.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));
|
|
|
recyclerViewContentsDetail.setAdapter(adapter);
|
|
|
}
|