Commit 6d994b9f authored by youjj's avatar youjj

完善旅游界面:确认下单;选出游人,费用明显,选择支付。

parent a3197986
......@@ -271,13 +271,33 @@
android:theme="@style/MyFrameTheme"
android:windowSoftInputMode="adjustResize|stateHidden" />
<activity
android:name="com.rv.travel.TravelFragmentActivity"
android:name="com.rv.travel.other.TravelFragmentActivity"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTask"
android:maxAspectRatio="2.4"
android:screenOrientation="portrait"
android:theme="@style/MyFrameTheme"
android:windowSoftInputMode="adjustResize|stateHidden" />
<!--查看预览图-->
<activity
android:name="com.frame.base.browse.ActivityImageBrowseInt"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleInstance"
android:maxAspectRatio="2.4"
android:screenOrientation="portrait"
android:theme="@style/MyFrameTheme"
android:windowSoftInputMode="adjustResize|stateHidden" />
<!--查看预览图-->
<activity
android:name="com.frame.base.browse.ActivityImageBrowseUrl"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleInstance"
android:maxAspectRatio="2.4"
android:screenOrientation="portrait"
android:theme="@style/MyFrameTheme"
android:windowSoftInputMode="adjustResize|stateHidden" />
<!--=================================================================-->
......
package com.frame.rv;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class BaseTitleBarLayout extends RelativeLayout {
public BaseTitleBarLayout(Context context) {
super(context);
init(context);
}
public BaseTitleBarLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
public BaseTitleBarLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private ImageView backImageView;
private TextView titleTextView;
private TextView buttonView;
private void init(Context context) {
View view = LayoutInflater.from(context).inflate(R.layout.layout_title_bar, this, true);
backImageView = view.findViewById(R.id.title_bar_back_image_view);
titleTextView = view.findViewById(R.id.title_bar_text_view);
buttonView = view.findViewById(R.id.title_bar_button_view);
buttonView.setVisibility(GONE);
}
public void setButtonView(String text,OnClickListener listener) {
buttonView.setVisibility(VISIBLE);
buttonView.setText(text);
buttonView.setOnClickListener(listener);
}
public void setBackClickListener(OnClickListener listener) {
if (listener==null){
setBackVisibility(GONE);
}else {
backImageView.setOnClickListener(listener);
}
}
public void setBackVisibility(int visibility) {
backImageView.setVisibility(visibility);
}
public void setTitleText(String text) {
titleTextView.setText(text);
}
}
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:enterFadeDuration="@integer/selector_duration" android:exitFadeDuration="@integer/selector_duration">
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:enterFadeDuration="@integer/selector_duration" android:exitFadeDuration="@integer/selector_duration">
<item android:drawable="@drawable/rv_common_icon_back_dark" android:state_pressed="false" />
<item android:drawable="@drawable/rv_common_icon_back_dark" />
<item android:drawable="@drawable/rv_common_icon_back_white" android:state_pressed="true" />
<item android:drawable="@drawable/rv_common_icon_back_white" android:state_pressed="true" tools:ignore="StateListReachable" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h5">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorTop"
android:gravity="center"
android:orientation="horizontal">
<View
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/title_bar_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="欣新房车"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h4" />
<LinearLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|end"
android:orientation="horizontal"
android:paddingRight="5dp">
<TextView
android:id="@+id/title_bar_button_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:clickable="true"
android:gravity="center"
android:padding="5dp"
android:text="button"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/_ui_text_size_h6" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/title_bar_back_image_view"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:padding="@dimen/ui_dimen_padding_h2"
android:scaleType="centerInside"
android:src="@drawable/rv_common_icon_back_dark" />
</RelativeLayout>
\ No newline at end of file
package com.rv.travel;
import android.app.Activity;
import com.base.utils.tools.android.IntentUtil;
import com.rv.travel.fragment.TravelFragmentCommitOrder;
import com.rv.travel.fragment.TravelWebFragment;
import com.rv.travel.other.OtherClickListener;
import com.rv.travel.other.OtherOption;
import com.rv.travel.other.TravelFragmentActivity;
public class GoOtherUtil {
//去旅游详情
public static void goTravelDetailWeb(Activity activity) {
TravelFragmentActivity.currentFragment = TravelWebFragment.getInstance("https://www.qq.com/");
OtherOption otherOption = new OtherOption();
otherOption.setTitle("详情");
otherOption.setClickListener(new OtherClickListener() {
@Override
public void onBack() {
TravelFragmentActivity.getInstance().finish();
}
@Override
public void onButton() {
}
});
TravelFragmentActivity.option = otherOption;
IntentUtil.goActivityWithAnimationAlpha(activity, TravelFragmentActivity.class);
}
//去确认订单
public static void goTravelCommitOrder(final Activity activity) {
TravelFragmentActivity.currentFragment = TravelFragmentCommitOrder.getInstance();
OtherOption otherOption = new OtherOption();
otherOption.setTitle("确认下单");
otherOption.setClickListener(new OtherClickListener() {
@Override
public void onBack() {
GoOtherUtil.goTravelDetailWeb(activity);
}
@Override
public void onButton() {
}
});
TravelFragmentActivity.option = otherOption;
IntentUtil.goActivityWithAnimationAlpha(activity, TravelFragmentActivity.class);
}
}
package com.rv.travel;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import com.base.utils.base.BaseActivity;
public class TravelFragmentActivity extends BaseActivity {
public static Fragment currentFragment = null;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fragment_other);
onData();
onView();
}
@Override
public void onData() {
setCurrentFragment();
}
@Override
public void onView() {
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setCurrentFragment();
}
private void setCurrentFragment() {
if (currentFragment != null) {
getSupportFragmentManager().beginTransaction().replace(R.id.other_fragment_layout, currentFragment).commitAllowingStateLoss();
}
}
}
package com.rv.travel.adapter;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.travel.R;
import com.rv.travel.bean.BeanTravelMember;
import java.util.List;
public class AdapterTravelMember extends BaseQuickAdapter<BeanTravelMember, AdapterTravelMember.AdapterViewHolder> {
public interface OnItemAllClickListener {
void onItemRootClick(BeanTravelMember bean);
void onItemDeleteClick(BeanTravelMember bean);
}
private OnItemAllClickListener itemClickListener;
public void setItemRootClickListener(OnItemAllClickListener itemClickListener) {
this.itemClickListener = itemClickListener;
}
public AdapterTravelMember(int layoutResId, @Nullable List<BeanTravelMember> data) {
super(layoutResId, data);
}
@Override
protected void convert(AdapterTravelMember.AdapterViewHolder helper, BeanTravelMember item) {
helper.nameView.setText(item.getName());
helper.itemRoot.setTag(item);
helper.itemRoot.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (itemClickListener != null) {
BeanTravelMember BeanTravelMember = (BeanTravelMember) v.getTag();
itemClickListener.onItemRootClick(BeanTravelMember);
}
}
});
helper.deleteView.setTag(item);
helper.deleteView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (itemClickListener != null) {
BeanTravelMember BeanTravelMember = (BeanTravelMember) v.getTag();
itemClickListener.onItemDeleteClick(BeanTravelMember);
}
}
});
}
public class AdapterViewHolder extends BaseViewHolder {
LinearLayout itemRoot;
ImageView deleteView;
TextView nameView;
TextView mobileView;
TextView idCardView;
public AdapterViewHolder(View view) {
super(view);
itemRoot = view.findViewById(R.id.item_travel_member_root);
deleteView = view.findViewById(R.id.item_travel_member_delete);
nameView = view.findViewById(R.id.item_travel_member_name);
mobileView = view.findViewById(R.id.item_travel_member_mobile);
idCardView = view.findViewById(R.id.item_travel_member_id_card);
}
}
}
package com.rv.travel.bean;
public class BeanTravelMember {
public BeanTravelMember(String name, String id) {
this.name = name;
this.id = id;
}
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
private String id;
}
package com.rv.travel.dialog;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.DialogInterface;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import com.base.utils.ui.dialog.DialogPlusUtil;
import com.base.utils.ui.dialog.DialogUtil;
import com.frame.base.FrameApp;
import com.orhanobut.dialogplus.DialogPlus;
import com.rv.travel.R;
import com.rv.travel.bean.BeanTravelMember;
import java.util.List;
public class TravelDialogUtil {
public interface OnDialogDoneCallback<T> {
void done(T t);
}
//选择出游人
public static void showSelectTravel(Context context, final List<BeanTravelMember> data,
final OnDialogDoneCallback<BeanTravelMember> callback) {
final String[] items;
if (data == null || data.size() == 0) {
items = new String[]{"无"};
} else {
items = new String[data.size()];
int i = 0;
for (BeanTravelMember bean : data) {
String text = bean.getName();
items[i] = text;
i += 1;
}
}
DialogUtil.getItemDialog(context, items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
if (callback != null) {
if (data != null && data.size() > 0) {
callback.done(data.get(which));
}
}
}
}).setTitle("选择出游人").create().show();
}
public static void showCommitOrderMoneyDetail(final Context context) {
View dialogView = LayoutInflater.from(context).inflate(R.layout.dialog_order_money_detail, null);
TravelDialogUtil.mDialogPlus = DialogPlusUtil.getDialogPlus(context, dialogView)
.create();
TravelDialogUtil.mDialogPlus.show();
dialogView.findViewById(R.id.money_detail_close).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismissDialogPlus();
}
});
dialogView.findViewById(R.id.commit_order_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismissDialogPlus();
FrameApp.getMainHandler().postDelayed(new Runnable() {
@Override
public void run() {
showPaySelectDialog(context, new OnDialogDoneCallback<Boolean>() {
@Override
public void done(Boolean aBoolean) {
}
});
}
}, 600);
}
});
}
@SuppressLint("StaticFieldLeak")
public static DialogPlus mDialogPlus = null;
public static void dismissDialogPlus() {
if (mDialogPlus != null) {
mDialogPlus.dismiss();
mDialogPlus = null;
}
}
private static boolean isPayWx = true;//默认选择微信支付
//选择支付
public static void showPaySelectDialog(Context context, final OnDialogDoneCallback<Boolean> listener) {
isPayWx = true;
dismissDialogPlus();
View dialogView = LayoutInflater.from(context).inflate(R.layout.dialog_order_select_pay, null);
TravelDialogUtil.mDialogPlus = DialogPlusUtil.getDialogPlus(context, dialogView)
.create();
TravelDialogUtil.mDialogPlus.show();
final ImageView payWx = dialogView.findViewById(R.id.select_pay_wx);
final ImageView payZfb = dialogView.findViewById(R.id.select_pay_zfb);
payWx.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
isPayWx = true;
payWx.setImageResource(R.mipmap.common_icon_pay_round);
payZfb.setImageResource(R.mipmap.common_icon_round);
}
});
payZfb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
isPayWx = false;
payZfb.setImageResource(R.mipmap.common_icon_pay_round);
payWx.setImageResource(R.mipmap.common_icon_round);
}
});
dialogView.findViewById(R.id.select_pay_close).
setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismissDialogPlus();
}
});
dialogView.findViewById(R.id.inquiry_doctor_pay_submit).
setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismissDialogPlus();
if (listener != null) {
listener.done(isPayWx);
}
}
});
}
}
package com.rv.travel.fragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import com.base.utils.base.BaseFragment;
import com.rv.travel.R;
import com.rv.travel.R2;
import com.rv.travel.adapter.AdapterTravelMember;
import com.rv.travel.bean.BeanTravelMember;
import com.rv.travel.dialog.TravelDialogUtil;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
//确认下单
public class TravelFragmentCommitOrder extends BaseFragment {
public static TravelFragmentCommitOrder getInstance() {
TravelFragmentCommitOrder instance = new TravelFragmentCommitOrder();
return instance;
}
@BindView(R2.id.commit_order_check_box)
CheckBox commitCheck;
@BindView(R2.id.commit_order_member_recycler)
RecyclerView memberRecycler;
@OnClick({
R2.id.commit_order_agree,
R2.id.commit_order_button,
R2.id.commit_order_select_member_text,
R2.id.commit_order_select_member_icon,
R2.id.commit_order_money_detail,
})
public void onTravelFragmentCommitOrderClick(View view) {
int id = view.getId();
if (id == R.id.commit_order_agree) {
//合同协议
} else if (id == R.id.commit_order_button) {
//提交订单
TravelDialogUtil.showPaySelectDialog(baseContext, new TravelDialogUtil.OnDialogDoneCallback<Boolean>() {
@Override
public void done(Boolean aBoolean) {
}
});
} else if (id == R.id.commit_order_money_detail) {
//费用明细
TravelDialogUtil.showCommitOrderMoneyDetail(baseContext);
} else if (id == R.id.commit_order_select_member_text || id == R.id.commit_order_select_member_icon) {
//选人员
List<BeanTravelMember> data = new ArrayList<>();
data.add(new BeanTravelMember("张3", "0"));
data.add(new BeanTravelMember("张4", "1"));
data.add(new BeanTravelMember("张5", "2"));
TravelDialogUtil.showSelectTravel(baseContext, data, new TravelDialogUtil.OnDialogDoneCallback<BeanTravelMember>() {
@Override
public void done(BeanTravelMember beanTravelMember) {
if (selectData.contains(beanTravelMember)) {
return;
}
selectData.add(beanTravelMember);
adapterTravelMember.setNewData(selectData);
}
});
}
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_travel_commit_order, container, false);
unbinder = ButterKnife.bind(this, view);
return view;
}
Unbinder unbinder;
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
onData();
onView();
}
private AdapterTravelMember adapterTravelMember;
private List<BeanTravelMember> selectData = new ArrayList<>();
@Override
public void onData() {
adapterTravelMember = new AdapterTravelMember(R.layout.item_travel_member, selectData);
adapterTravelMember.setItemRootClickListener(new AdapterTravelMember.OnItemAllClickListener() {
@Override
public void onItemRootClick(final BeanTravelMember bean) {
}
@Override
public void onItemDeleteClick(BeanTravelMember bean) {
selectData.remove(bean);
adapterTravelMember.setNewData(selectData);
}
});
memberRecycler.setLayoutManager(new LinearLayoutManager(baseContext));
memberRecycler.setAdapter(adapterTravelMember);
}
@Override
public void onView() {
}
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
//热门旅游 更多
public class TravelFragmentHotMore extends BaseFragment {
private String clientClazzName = null;
......
......@@ -15,13 +15,17 @@ import android.widget.ImageView;
import com.base.utils.base.BaseFragment;
import com.base.utils.tools.android.IntentUtil;
import com.frame.base.browse.ActivityImageBrowseInt;
import com.frame.base.glide.GlideManager;
import com.rv.travel.TravelFragmentActivity;
import com.rv.travel.adapter.AdapterRim;
import com.rv.travel.GoOtherUtil;
import com.rv.travel.R;
import com.rv.travel.R2;
import com.rv.travel.TravelActivity;
import com.rv.travel.adapter.AdapterRim;
import com.rv.travel.bean.BeanRim;
import com.rv.travel.other.OtherClickListener;
import com.rv.travel.other.OtherOption;
import com.rv.travel.other.TravelFragmentActivity;
import com.yuyife.banner.Banner;
import com.yuyife.banner.BannerConfig;
import com.yuyife.banner.listener.OnBannerListener;
......@@ -33,7 +37,7 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
//热门旅游 某个子栏目
public class TravelFragmentHotType extends BaseFragment {
@BindView(R2.id.travel_banner)
Banner banner;
......@@ -98,7 +102,6 @@ public class TravelFragmentHotType extends BaseFragment {
private void setRim() {
List<BeanRim> data = new ArrayList<>();
data.add(new BeanRim());
data.add(new BeanRim());
......@@ -113,8 +116,7 @@ public class TravelFragmentHotType extends BaseFragment {
adapterRim.setItemRootClickListener(new AdapterRim.OnItemRootClickListener() {
@Override
public void onItemClick(BeanRim bean) {
TravelFragmentActivity.currentFragment = TravelWebFragment.getInstance("https://www.qq.com/");
IntentUtil.goActivityWithAnimationAlpha(getActivity(), TravelFragmentActivity.class);
GoOtherUtil.goTravelDetailWeb(getActivity());
}
});
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(baseContext);
......@@ -155,7 +157,12 @@ public class TravelFragmentHotType extends BaseFragment {
.setOnBannerListener(new OnBannerListener() {
@Override
public void OnBannerClick(int position) {
if (localImages != null && localImages.size() > 0) {
Bundle bundle = new Bundle();
bundle.putInt(ActivityImageBrowseInt.KEY_BACKGROUND, R.color.colorPrimary);
bundle.putIntegerArrayList(ActivityImageBrowseInt.KEY_IMAGE, (ArrayList<Integer>) localImages);
IntentUtil.startActivity(baseContext, ActivityImageBrowseInt.class, bundle);
}
}
})
.start();
......@@ -170,11 +177,12 @@ public class TravelFragmentHotType extends BaseFragment {
hotMoreLayoutStatic.setVisibility(View.VISIBLE);
if (travelFragmentHotMore == null) {
travelFragmentHotMore = TravelFragmentHotMore.getInstance(TravelFragmentHotType.class.getSimpleName());
travelFragmentHotMore = TravelFragmentHotMore.getInstance(TravelFragmentHotType.class.getSimpleName());
}
getChildFragmentManager().beginTransaction().replace(R.id.travel_fragment_hot_more_layout, travelFragmentHotMore).commitAllowingStateLoss();
}
public static void hideHotMoreFragment() {
TravelActivity.hotMoreTitleLayoutStatic.setVisibility(View.GONE);
hotMoreLayoutStatic.setVisibility(View.GONE);
......
......@@ -16,13 +16,15 @@ import android.widget.ImageView;
import com.base.animset.util.NiftyEffects;
import com.base.utils.base.BaseFragment;
import com.base.utils.tools.android.IntentUtil;
import com.frame.base.browse.ActivityImageBrowseInt;
import com.frame.base.browse.ActivityImageBrowseUrl;
import com.frame.base.glide.GlideManager;
import com.rv.travel.TravelFragmentActivity;
import com.rv.travel.adapter.AdapterHot;
import com.rv.travel.adapter.AdapterRim;
import com.rv.travel.GoOtherUtil;
import com.rv.travel.R;
import com.rv.travel.R2;
import com.rv.travel.TravelActivity;
import com.rv.travel.adapter.AdapterHot;
import com.rv.travel.adapter.AdapterRim;
import com.rv.travel.bean.BeanHot;
import com.rv.travel.bean.BeanRim;
import com.yuyife.banner.Banner;
......@@ -37,7 +39,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
//主页面
public class TravelFragmentMain extends BaseFragment {
@BindView(R2.id.travel_banner)
Banner banner;
......@@ -135,8 +137,8 @@ public class TravelFragmentMain extends BaseFragment {
adapterRim.setItemRootClickListener(new AdapterRim.OnItemRootClickListener() {
@Override
public void onItemClick(BeanRim bean) {
TravelFragmentActivity .currentFragment = TravelWebFragment.getInstance("https://www.qq.com/");
IntentUtil.goActivityWithAnimationAlpha(getActivity(), TravelFragmentActivity.class);
GoOtherUtil.goTravelDetailWeb(getActivity());
}
});
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(baseContext);
......@@ -177,7 +179,12 @@ public class TravelFragmentMain extends BaseFragment {
.setOnBannerListener(new OnBannerListener() {
@Override
public void OnBannerClick(int position) {
if (localImages != null && localImages.size() > 0) {
Bundle bundle = new Bundle();
bundle.putInt(ActivityImageBrowseInt.KEY_BACKGROUND, R.color.colorPrimary);
bundle.putIntegerArrayList(ActivityImageBrowseInt.KEY_IMAGE, (ArrayList<Integer>) localImages);
IntentUtil.startActivity(baseContext, ActivityImageBrowseInt.class, bundle);
}
}
})
.start();
......
......@@ -9,14 +9,19 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.base.utils.base.BaseFragment;
import com.base.utils.tools.android.IntentUtil;
import com.just.agentweb.AgentWeb;
import com.rv.travel.GoOtherUtil;
import com.rv.travel.R;
import com.rv.travel.R2;
import com.rv.travel.other.OtherClickListener;
import com.rv.travel.other.OtherOption;
import com.rv.travel.other.TravelFragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
//旅游详情
public class TravelWebFragment extends BaseFragment {
public static TravelWebFragment getInstance(String url) {
......@@ -34,6 +39,12 @@ public class TravelWebFragment extends BaseFragment {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_web, container, false);
unbinder = ButterKnife.bind(this, view);
view.findViewById(R.id.travel_web_go_order).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
GoOtherUtil.goTravelCommitOrder(getActivity());
}
});
return view;
}
......@@ -51,6 +62,7 @@ public class TravelWebFragment extends BaseFragment {
public void onData() {
}
@Override
......
package com.rv.travel.other;
import java.io.Serializable;
public abstract class OtherClickListener implements Serializable {
public abstract void onBack();
public abstract void onButton();
}
package com.rv.travel.other;
import java.io.Serializable;
public class OtherOption implements Serializable {
private String title;
private String buttonText;
private OtherClickListener clickListener;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getButtonText() {
return buttonText;
}
public void setButtonText(String buttonText) {
this.buttonText = buttonText;
}
public OtherClickListener getClickListener() {
return clickListener;
}
public void setClickListener(OtherClickListener clickListener) {
this.clickListener = clickListener;
}
}
package com.rv.travel.other;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.View;
import com.base.utils.base.BaseActivity;
import com.base.utils.ui.datetime.selector.util.TextUtil;
import com.frame.rv.BaseTitleBarLayout;
import com.rv.travel.R;
import com.rv.travel.R2;
import butterknife.BindView;
import butterknife.ButterKnife;
//所有的子页面的依附的Activity
public class TravelFragmentActivity extends BaseActivity {
public static OtherOption option = null;
public static Fragment currentFragment = null;
@SuppressLint("StaticFieldLeak")
public static TravelFragmentActivity instance = null;
public static TravelFragmentActivity getInstance() {
return TravelFragmentActivity.instance;
}
@BindView(R2.id.other_title_bar_layout)
BaseTitleBarLayout titleBarLayout;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fragment_other);
ButterKnife.bind(this);
TravelFragmentActivity.instance = this;
onData();
onView();
}
@Override
public void onData() {
applyOption();
}
@Override
public void onView() {
setCurrentFragment();
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
applyOption();
setCurrentFragment();
}
//加载碎片
private void setCurrentFragment() {
if (TravelFragmentActivity.currentFragment != null) {
getSupportFragmentManager().beginTransaction().replace(R.id.other_fragment_layout, TravelFragmentActivity.currentFragment).commitAllowingStateLoss();
}
}
//设置参数
private void applyOption() {
if (TravelFragmentActivity.option == null) return;
titleBarLayout.setTitleText(TravelFragmentActivity.option.getTitle());
if (TravelFragmentActivity.option.getClickListener() == null) {
titleBarLayout.setBackClickListener(null);
} else {
titleBarLayout.setBackClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
TravelFragmentActivity.option.getClickListener().onBack();
}
});
if (!TextUtil.isEmpty(TravelFragmentActivity.option.getButtonText())) {
titleBarLayout.setButtonView(option.getButtonText(), new View.OnClickListener() {
@Override
public void onClick(View v) {
TravelFragmentActivity.option.getClickListener().onButton();
}
});
}
}
}
@Override
protected void onDestroy() {
super.onDestroy();
TravelFragmentActivity.currentFragment = null;
TravelFragmentActivity.instance = null;
TravelFragmentActivity.option = null;
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<com.frame.rv.BaseTitleBarLayout
android:id="@+id/other_title_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/other_fragment_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</LinearLayout>
......@@ -14,7 +14,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h5"
android:layout_height="match_parent"
android:background="@color/colorTop"
android:gravity="center"
android:orientation="horizontal">
......@@ -80,10 +80,10 @@
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_common_large"
android:background="@drawable/ui_selector_radius_common_primary_h1"
android:paddingBottom="@dimen/ui_dimen_common_small"
android:paddingLeft="@dimen/ui_dimen_common"
android:paddingRight="@dimen/ui_dimen_common"
android:paddingTop="@dimen/ui_dimen_common_small"
android:paddingRight="@dimen/ui_dimen_common"
android:paddingBottom="@dimen/ui_dimen_common_small"
android:text="确定"
android:textColor="@color/colorTop"
android:textSize="@dimen/_ui_text_size_h6"
......@@ -103,17 +103,18 @@
<FrameLayout
android:id="@+id/travel_hot_type_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h5"
android:layout_height="match_parent"
android:background="@color/colorTop"
android:visibility="gone">
<ImageView
android:id="@+id/travel_hot_type_back"
android:layout_width="40dp"
android:layout_width="50dp"
android:layout_height="match_parent"
android:clickable="true"
android:padding="@dimen/ui_dimen_padding_h2"
android:scaleType="centerInside"
android:src="@drawable/selector_common_back" />
android:src="@drawable/rv_common_icon_back_dark" />
<LinearLayout
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorTop"
android:orientation="vertical"
android:paddingTop="@dimen/ui_dimen_common_large">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h4"
android:paddingLeft="@dimen/ui_dimen_common_large"
android:paddingRight="@dimen/ui_dimen_common_large">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="费用明细"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/ui_text_size_h5" />
<ImageView
android:id="@+id/money_detail_close"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:scaleType="centerInside"
android:paddingLeft="@dimen/ui_dimen_padding_h2"
android:paddingTop="@dimen/ui_dimen_padding_h2"
android:paddingBottom="@dimen/ui_dimen_padding_h2"
android:src="@mipmap/rv_common_icon_close" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h5"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_padding_h1"
android:paddingRight="@dimen/ui_dimen_padding_h1">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|start"
android:text="成人价格:"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:lines="1"
android:text="¥5000/天x2人"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:lines="1"
android:text="¥10000"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h5"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_padding_h1"
android:paddingRight="@dimen/ui_dimen_padding_h1">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|start"
android:text="儿童价格:"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:lines="1"
android:text="¥5000/天x2人"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:lines="1"
android:text="¥10000"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h5"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_padding_h1"
android:paddingRight="@dimen/ui_dimen_padding_h1">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|start"
android:text="保险费用:"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:lines="1"
android:text="¥100/天x3人6天"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:lines="1"
android:text="¥1800"
android:textColor="@color/colorTextH2"
android:textSize="@dimen/_ui_text_size_h6" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h3"
android:background="@color/colorTop"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_padding_h1">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center|start"
android:text="支付金额:"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h5" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:gravity="center|start"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="1"
android:text="¥"
android:textColor="@color/uiColorLittle"
android:textSize="@dimen/_ui_text_size_h3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="1"
android:text="28000"
android:textColor="@color/uiColorLittle"
android:textSize="@dimen/_ui_text_size_h3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:layout_marginRight="@dimen/ui_dimen_margin_h1"
android:lines="1"
android:text="明细"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h5"
android:visibility="invisible" />
<TextView
android:id="@+id/commit_order_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/ui_dimen_common"
android:background="@drawable/ui_shape_radius_common_primary_h1"
android:clickable="true"
android:gravity="center"
android:lines="1"
android:text="确认订单"
android:textColor="@color/colorTop"
android:textSize="@dimen/_ui_text_size_h3" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorTop"
android:orientation="vertical"
android:paddingTop="@dimen/ui_dimen_common_large">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h4"
android:paddingLeft="@dimen/ui_dimen_common_large"
android:paddingRight="@dimen/ui_dimen_common_large">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="请选择支付方式"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h4" />
<ImageView
android:id="@+id/select_pay_close"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:paddingLeft="@dimen/ui_dimen_padding_h2"
android:paddingTop="@dimen/ui_dimen_padding_h2"
android:paddingBottom="@dimen/ui_dimen_padding_h2"
android:scaleType="centerInside"
android:src="@mipmap/rv_common_icon_close" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/ui_dimen_line"
android:background="@color/uiBackgroundLine" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h4"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_common_large"
android:paddingRight="@dimen/ui_dimen_common_large">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="实付金额:"
android:textColor="@color/colorTextH3"
android:textSize="@dimen/ui_text_size_h5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="@color/uiColorLittle"
android:textSize="@dimen/ui_text_size_h3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_margin_h1"
android:text="3562.00"
android:textColor="@color/uiColorLittle"
android:textSize="@dimen/ui_text_size_h5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h4"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_common_large"
android:paddingRight="@dimen/ui_dimen_common_large">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_common_large"
android:src="@mipmap/client_icon_wechat_pay" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="微信支付"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h5" />
<ImageView
android:id="@+id/select_pay_wx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/ui_dimen_common_large"
android:src="@mipmap/common_icon_pay_round" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/ui_dimen_line"
android:background="@color/uiBackgroundLine" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h4"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_common_large"
android:paddingRight="@dimen/ui_dimen_common_large">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_common_large"
android:src="@mipmap/client_icon_alipay" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="支付宝支付"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h5" />
<ImageView
android:id="@+id/select_pay_zfb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/ui_dimen_common_large"
android:src="@mipmap/common_icon_round" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/ui_dimen_line"
android:layout_marginBottom="@dimen/ui_dimen_margin_h8"
android:background="@color/uiBackgroundLine" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h4"
android:layout_marginBottom="@dimen/ui_dimen_margin_h2"
android:background="@color/colorTop"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/ui_dimen_common_large"
android:paddingRight="@dimen/ui_dimen_common_large">
<TextView
android:id="@+id/inquiry_doctor_pay_submit"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/ui_dimen_common"
android:layout_marginBottom="@dimen/ui_dimen_common"
android:layout_weight="1"
android:background="@drawable/ui_shape_radius_common_primary_h1"
android:clickable="true"
android:gravity="center"
android:text="立即支付"
android:textColor="@color/colorTop"
android:textSize="@dimen/ui_text_size_h5" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/travel_web_fragment_root"
android:layout_height="match_parent">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/travel_web_fragment_root"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<Button
android:id="@+id/travel_web_go_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:text="确认下单" />
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/_ui_height_h3"
android:gravity="center"
android:clickable="true"
android:id="@+id/item_travel_member_root"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:layout_marginRight="@dimen/ui_dimen_margin_h3"
android:text="成员"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h5" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingTop="@dimen/ui_dimen_common">
<TextView
android:id="@+id/item_travel_member_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_margin_h1"
android:text="姓名"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h6" />
<TextView
android:id="@+id/item_travel_member_mobile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="手机"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h6" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center|start"
android:orientation="horizontal"
android:paddingBottom="@dimen/ui_dimen_common">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_common"
android:text="身份证号"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h6" />
<TextView
android:id="@+id/item_travel_member_id_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="430528199602035216"
android:textColor="@color/colorTextH1"
android:textSize="@dimen/_ui_text_size_h6" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/item_travel_member_delete"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="@dimen/ui_dimen_common"
android:padding="10dp"
android:src="@mipmap/rv_common_icon_close" />
</LinearLayout>
\ No newline at end of file
......@@ -132,29 +132,31 @@ public class IntentUtil {
}
//从当前Activity跳转到目标Activity,并在当前Activity上应用动画
public static void goActivityWithAnimation(Activity currentActivity , Class<? extends Activity> targetActivity){
public static void goActivityWithAnimation(Activity currentActivity, Class<? extends Activity> targetActivity) {
Intent intent = new Intent(currentActivity, targetActivity);
addFlags(intent);
currentActivity.startActivity(intent);
//两个参数分别是新的activity进入的动画和当前activity退出的动画
currentActivity.overridePendingTransition(R.anim.utils_left_to_right,R.anim.utils_right_to_left);
currentActivity.overridePendingTransition(R.anim.utils_left_to_right, R.anim.utils_right_to_left);
}
//从当前Activity跳转到目标Activity,并在当前Activity上应用动画
public static void goActivityWithAnimationZoom(Activity currentActivity , Class<? extends Activity> targetActivity){
public static void goActivityWithAnimationZoom(Activity currentActivity, Class<? extends Activity> targetActivity) {
Intent intent = new Intent(currentActivity, targetActivity);
addFlags(intent);
currentActivity.startActivity(intent);
//两个参数分别是新的activity进入的动画和当前activity退出的动画
currentActivity.overridePendingTransition(R.anim.utils_zoom_in,R.anim.utils_zoom_out);
currentActivity.overridePendingTransition(R.anim.utils_zoom_in, R.anim.utils_zoom_out);
}
//从当前Activity跳转到目标Activity,并在当前Activity上应用动画
public static void goActivityWithAnimationAlpha(Activity currentActivity , Class<? extends Activity> targetActivity){
public static void goActivityWithAnimationAlpha(Activity currentActivity, Class<? extends Activity> targetActivity) {
Intent intent = new Intent(currentActivity, targetActivity);
addFlags(intent);
currentActivity.startActivity(intent);
//两个参数分别是新的activity进入的动画和当前activity退出的动画
currentActivity.overridePendingTransition(R.anim.utils_alpha_in,R.anim.utils_alpha_out);
currentActivity.overridePendingTransition(R.anim.utils_alpha_in, R.anim.utils_alpha_out);
}
......
......@@ -16,7 +16,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
classpath 'com.mob.sdk:MobSDK:+'
//classpath 'com.mob.sdk:MobSDK:+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......@@ -48,12 +48,12 @@ ext {
versionName = "1.0"
supportVersion = '28.0.0'
okHttpVersion = '3.8.1' //okHttp
gsonVersion = '2.8.2' //gson
glideVersion = '3.7.0' //glide
eventBusVersion = '3.0.0' //事件部线
quickAdapterVersion = '2.9.42' //baseQuickAdapter
wechatPayVersion = '5.3.1' //微信支付
okHttpVersion = '3.8.1' //okHttp
gsonVersion = '2.8.2' //gson
glideVersion = '3.7.0' //glide
eventBusVersion = '3.0.0' //事件总线
quickAdapterVersion = '2.9.42' //baseQuickAdapter
wechatPayVersion = '5.3.1' //微信支付
sign = [
keyAlias : "yuyife",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment