Commit ba5329bc authored by lify's avatar lify

让代码运行

parent d3e4826a
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.yuyife.mimc"/>
\ No newline at end of file
...@@ -45,6 +45,6 @@ dependencies { ...@@ -45,6 +45,6 @@ dependencies {
api project(path: ':RvTravel') api project(path: ':RvTravel')
api project(path: ':RvHome') api project(path: ':RvHome')
api project(path: ':RvMine') //api project(path: ':RvMine')
} }
...@@ -325,16 +325,16 @@ ...@@ -325,16 +325,16 @@
<!--=================================================================--> <!--=================================================================-->
<!-- 我的模块 --> <!--&lt;!&ndash; 我的模块 &ndash;&gt;-->
<activity <!--<activity-->
android:name="com.rv.rvmine.MineActivity" <!--android:name="com.rv.rvmine.MineActivity"-->
android:launchMode="singleTask" <!--android:launchMode="singleTask"-->
android:screenOrientation="portrait" /> <!--android:screenOrientation="portrait" />-->
<!--身份证认证--> <!--&lt;!&ndash;身份证认证&ndash;&gt;-->
<activity android:name="com.rv.rvmine.IDCardCertificationActivity" <!--<activity android:name="com.rv.rvmine.IDCardCertificationActivity"-->
android:launchMode="singleTask" <!--android:launchMode="singleTask"-->
android:screenOrientation="portrait" /> <!--android:screenOrientation="portrait" />-->
<!--=================================================================--> <!--=================================================================-->
......
package com.test.rv; package com.test.rv;
import android.widget.Toast;
import com.base.utils.tools.android.IntentUtil; import com.base.utils.tools.android.IntentUtil;
import com.frame.base.FrameApp; import com.frame.base.FrameApp;
import com.frame.rv.ModuleChangeUtil; import com.frame.rv.ModuleChangeUtil;
import com.frame.rv.OnModuleChangedListener; import com.frame.rv.OnModuleChangedListener;
import com.rv.home.rv.module.ui.main.HomeActivity; import com.rv.home.rv.module.ui.main.HomeActivity;
import com.rv.rvmine.MineActivity; //import com.rv.rvmine.MineActivity;
import com.rv.travel.TravelActivity; import com.rv.travel.TravelActivity;
public class ModuleUtil { public class ModuleUtil {
...@@ -49,11 +47,11 @@ public class ModuleUtil { ...@@ -49,11 +47,11 @@ public class ModuleUtil {
break; break;
case OnModuleChangedListener.MODULE_MINE: case OnModuleChangedListener.MODULE_MINE:
if (currentModule == OnModuleChangedListener.MODULE_MINE) return; if (currentModule == OnModuleChangedListener.MODULE_MINE) return;
if (ModuleChangeUtil.currentActivity != null) { // if (ModuleChangeUtil.currentActivity != null) {
IntentUtil.goActivityWithAnimationAlpha(ModuleChangeUtil.currentActivity, MineActivity.class); // IntentUtil.goActivityWithAnimationAlpha(ModuleChangeUtil.currentActivity, MineActivity.class);
} else { // } else {
IntentUtil.startActivity(FrameApp.getInstance(), MineActivity.class); // IntentUtil.startActivity(FrameApp.getInstance(), MineActivity.class);
} // }
break; break;
} }
currentModule = module; currentModule = module;
......
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.rv.mine"/>
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
api "com.android.support:support-v4:$rootProject.ext.supportVersion"
api "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
api "com.android.support:design:$rootProject.ext.supportVersion"
api "com.android.support:recyclerview-v7:$rootProject.ext.supportVersion"
api "com.android.support:cardview-v7:$rootProject.ext.supportVersion"
api 'com.android.support.constraint:constraint-layout:1.1.3'
api 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
api project(':RvWrapper')
api project(':RvHome')
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rv.rvmine">
</manifest>
\ No newline at end of file
package com.rv.rvmine;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.home.rv.module.basic.presenter.PickerPresenter;
public class IDCardCertificationActivity extends BaseStatusActivity<PickerPresenter> {
public static Intent getIntent(Context context) {
return new Intent(context, IDCardCertificationActivity.class);
}
@Override
protected int setLayout() {
return R.layout.activity_idcard_certification;
}
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle(mActivity.getString(R.string.tv_id_card_certrfication_title));
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
}
package com.rv.rvmine;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.base.utils.base.BaseActivity;
import com.frame.rv.BaseTabLayout;
import com.frame.rv.ModuleChangeUtil;
import com.frame.rv.OnModuleChangedListener;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.home.rv.AppConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.login.LoginRvActivity;
import com.rv.home.rv.module.ui.main.home.order.OrderListActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class MineActivity extends BaseStatusActivity<CommonPresenter> {
@BindView(R2.id.travel_tab_layout)
BaseTabLayout travelTabLayout;
@BindView(R2.id.iv_avatar)
ImageView ivAvatar;
@BindView(R2.id.tv_nickname)
TextView tvNickname;
@BindView(R2.id.iv_member)
ImageView ivMember;
@BindView(R2.id.tv_login)
TextView tvLogin;
@BindView(R2.id.tv_verified)
TextView tvVerified;
@BindView(R2.id.iv_notification)
ImageView ivNotification;
@BindView(R2.id.tv_membership_level)
TextView tvMembershipLevel;
@BindView(R2.id.tv_member_hint)
TextView tvMemberHint;
@BindView(R2.id.tv_view_privileges)
TextView tvViewPrivileges;
@BindView(R2.id.rl_item_to_be_paid)
RelativeLayout rlItemToBePaid;
@BindView(R2.id.rl_item_staying)
RelativeLayout rlItemStaying;
@BindView(R2.id.rl_item_traveling)
RelativeLayout rlItemTraveling;
@BindView(R2.id.rl_item_completed)
RelativeLayout rlItemCompleted;
@BindView(R2.id.rl_item_all)
RelativeLayout rlItemAll;
@BindView(R2.id.rl_item_collection)
RelativeLayout rlItemCollection;
@BindView(R2.id.rl_item_personal_information)
RelativeLayout rlItemPersonalInformation;
@BindView(R2.id.rl_item_information)
RelativeLayout rlItemInformation;
@BindView(R2.id.rl_item_setting)
RelativeLayout rlItemSetting;
@BindView(R2.id.travel_fragment_layout)
LinearLayout travelFragmentLayout;
@Override
protected int setLayout() {
return R.layout.activity_mine;
}
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
showTitle(false);
travelTabLayout.setCurrent(OnModuleChangedListener.MODULE_MINE);
if (TextUtils.isEmpty(AppConfig.APP_TOKEN)) {
tvNickname.setVisibility(View.GONE);
ivMember.setVisibility(View.GONE);
tvLogin.setVisibility(View.VISIBLE);
tvVerified.setVisibility(View.GONE);
}else {
tvNickname.setVisibility(View.VISIBLE);
ivMember.setVisibility(View.VISIBLE);
tvLogin.setVisibility(View.GONE);
tvVerified.setVisibility(View.VISIBLE);
showToast(UtilsManager.getInstance(mActivity).getSPStringCode("city_json","username"));
tvNickname.setText(UtilsManager.getInstance(mActivity).getSPStringCode("city_json","username"));
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
ModuleChangeUtil.currentActivity = this;
}
@OnClick({R2.id.iv_avatar, R2.id.tv_login, R2.id.tv_verified, R2.id.rl_item_to_be_paid, R2.id.rl_item_staying, R2.id.rl_item_traveling, R2.id.rl_item_completed, R2.id.rl_item_all, R2.id.rl_item_collection, R2.id.rl_item_personal_information, R2.id.rl_item_information, R2.id.rl_item_setting})
public void onViewClicked(View view) {
int id = view.getId();
if (id ==R.id.iv_avatar){
//头像
if (isLogin()) return;
}else if (id== R.id.tv_login){
//登录
startActivity(LoginRvActivity.getIntent(mActivity));
}else if (id == R.id.tv_verified){
//实名认证
if (isLogin()) return;
startActivity(IDCardCertificationActivity.getIntent(mActivity));
}else if (id == R.id.rl_item_to_be_paid){
//待支付
if (isLogin()) return;
startActivity(OrderListActivity.getIntent(mActivity, 0));
}else if (id == R.id.rl_item_staying){
//待出行
if (isLogin()) return;
startActivity(OrderListActivity.getIntent(mActivity, 1));
}else if (id ==R.id.rl_item_traveling){
//出行中
if (isLogin()) return;
startActivity(OrderListActivity.getIntent(mActivity, 2));
}else if (id == R.id.rl_item_completed){
//已完成
if (isLogin()) return;
startActivity(OrderListActivity.getIntent(mActivity, 3));
}else if (id ==R.id.rl_item_all){
//全部
if (isLogin()) return;
startActivity(OrderListActivity.getIntent(mActivity, 4));
}else if (id == R.id.rl_item_collection){
//收藏
if (isLogin()) return;
}else if (id == R.id.rl_item_personal_information){
//个人资料
if (isLogin()) return;
}else if (id == R.id.rl_item_information){
//信息
if (isLogin()) return;
}else if (id ==R.id.rl_item_setting){
//设置
}
}
/**
* 判断是否登录
* @return
*/
private boolean isLogin() {
if (TextUtils.isEmpty(AppConfig.APP_TOKEN)) {
startActivity(LoginRvActivity.getIntent(mActivity));
return true;
}
return false;
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!--空心框 圆角 少量红-->
<corners android:radius="@dimen/ui_dimen_radius" />
<stroke
android:width="@dimen/ui_dimen_stroke"
android:color="@color/colorYellow" />
<solid android:color="@color/uiColorTransparency" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWrite">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWrite"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:padding="@dimen/size_15"
android:text="@string/tv_id_card_certrfication"
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
<include layout="@layout/common_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/size_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_name"
android:textColor="@color/textGray"
android:textSize="@dimen/text_14" />
<EditText
android:id="@+id/et_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:hint="@string/tv_name_hint"
android:maxLength="10"
android:paddingLeft="@dimen/size_20"
android:text=""
android:textColor="@color/textMain"
android:textSize="@dimen/text_14" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:background="@color/colorWrite">
<include layout="@layout/common_line" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:orientation="horizontal"
android:padding="@dimen/size_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_phone"
android:textColor="@color/textGray"
android:textSize="@dimen/text_14" />
<EditText
android:id="@+id/et_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:hint="@string/tv_phone_hint"
android:maxLength="11"
android:paddingLeft="@dimen/size_20"
android:inputType="number"
android:text=""
android:textColor="@color/textMain"
android:textSize="@dimen/text_14" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:background="@color/colorWrite">
<include layout="@layout/common_line" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:orientation="horizontal"
android:padding="@dimen/size_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_id_card"
android:textColor="@color/textGray"
android:textSize="@dimen/text_14" />
<EditText
android:id="@+id/et_id_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:hint="@string/tv_id_card_hint"
android:maxLength="18"
android:paddingLeft="@dimen/size_20"
android:text=""
android:textColor="@color/textMain"
android:textSize="@dimen/text_14" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:background="@color/colorWrite">
<include layout="@layout/common_line" />
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:padding="@dimen/size_15"
android:layout_marginTop="@dimen/size_5"
android:text="@string/tv_point"
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
<RelativeLayout
android:id="@+id/rl_card"
android:layout_marginTop="@dimen/size_20"
android:layout_marginRight="@dimen/size_80"
android:layout_marginLeft="@dimen/size_80"
android:background="@color/colorLine"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_card"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="@dimen/size_150" />
<LinearLayout
android:id="@+id/ll_card"
android:layout_centerInParent="true"
android:orientation="vertical"
android:layout_width="wrap_content"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/mycenter_icon_id_card_btn"
android:layout_width="@dimen/size_45"
android:layout_height="@dimen/size_30" />
<TextView
android:layout_marginTop="@dimen/size_10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_front"
/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_card_copy"
android:layout_marginTop="@dimen/size_20"
android:layout_marginRight="@dimen/size_80"
android:layout_marginLeft="@dimen/size_80"
android:background="@color/colorLine"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_card_copy"
android:layout_width="match_parent"
android:scaleType="centerCrop"
android:layout_height="@dimen/size_150" />
<LinearLayout
android:id="@+id/ll_card_copy"
android:layout_centerInParent="true"
android:orientation="vertical"
android:layout_width="wrap_content"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/mycenter_icon_id_card_btn"
android:layout_width="@dimen/size_45"
android:layout_height="@dimen/size_30" />
<TextView
android:layout_marginTop="@dimen/size_10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tv_negative"
/>
</LinearLayout>
</RelativeLayout>
<TextView
android:layout_marginTop="@dimen/size_15"
android:text="@string/tv_id_card_photo_hint"
android:layout_width="match_parent"
android:textSize="@dimen/text_12"
android:textColor="@color/textLightGrey"
android:layout_height="wrap_content"
android:gravity="center"
/>
<TextView
android:layout_width="match_parent"
android:text="下一步"
android:id="@+id/tv_ok"
android:layout_margin="@dimen/size_25"
android:textColor="@color/colorWrite"
android:background="@drawable/resource_drawable_shape_member_bg"
android:gravity="center"
android:textSize="@dimen/text_16"
android:layout_height="@dimen/size_50" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/size_20"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
<resources>
<string name="app_name">Travel</string>
<string name="tv_login">登录</string>
<string name="tv_view_privileges">查看会员特权</string>
<string name="tv_my_order">我的订单</string>
<string name="tv_to_be_paid">待支付</string>
<string name="tv_staying">待出行</string>
<string name="tv_traveling">出行中</string>
<string name="tv_completed">已完成</string>
<string name="tv_all">全部</string>
<string name="tv_collection">收藏</string>
<string name="tv_personal_information">个人资料</string>
<string name="tv_information">信息</string>
<string name="tv_setting">设置</string>
<string name="tv_id_card_certrfication">身份证信息</string>
<string name="tv_name">姓 名:</string>
<string name="tv_name_hint">请输入姓名</string>
<string name="tv_phone">手机号:</string>
<string name="tv_phone_hint">请输入手机号</string>
<string name="tv_id_card">身份证号:</string>
<string name="tv_id_card_hint">请输入身份证号</string>
<string name="tv_point">请拍摄/上传身份证</string>
<string name="tv_front">正面</string>
<string name="tv_negative">反面</string>
<string name="tv_id_card_photo_hint">*您所上传的身份证信息,仅用于欣新房车验证</string>
<string name="tv_id_card_certrfication_title">身份证认证</string>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/rv_common_icon_back_white" android:state_checked="false" />
<item android:drawable="@drawable/rv_common_icon_back_dark" android:state_checked="true" />
</selector>
...@@ -10,6 +10,6 @@ include ':Resource' ...@@ -10,6 +10,6 @@ include ':Resource'
include ':Utils' include ':Utils'
include ':MyFrame' include ':MyFrame'
include ':Banner' include ':Banner'
include ':RvMine' //include ':RvMine'
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