Commit bc301d86 authored by linfeng's avatar linfeng

bug修复

parent eeaa6345
...@@ -54,4 +54,5 @@ dependencies { ...@@ -54,4 +54,5 @@ dependencies {
api project(path: ':module_mine') api project(path: ':module_mine')
api project(path: ':module_camp') api project(path: ':module_camp')
api project(path: ':module_tourism') api project(path: ':module_tourism')
api project(path: ':module_discovery')
} }
...@@ -2,7 +2,6 @@ package com.xxfc.rv; ...@@ -2,7 +2,6 @@ package com.xxfc.rv;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
...@@ -25,7 +24,7 @@ import com.rv.camp.CampFragment; ...@@ -25,7 +24,7 @@ import com.rv.camp.CampFragment;
import com.rv.component.utils.Cooker; import com.rv.component.utils.Cooker;
import com.rv.home.rv.module.ApiConfig; import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter; import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.adapter.TabAdapter; import com.ruiwenliu.wrapper.adapter.TabAdapter;
import com.rv.home.rv.module.ui.main.home.HomeFragment; import com.rv.home.rv.module.ui.main.home.HomeFragment;
import com.rv.home.rv.module.ui.main.home.bean.EffectiveTimeBean; import com.rv.home.rv.module.ui.main.home.bean.EffectiveTimeBean;
import com.rv.rvmine.MineFragment; import com.rv.rvmine.MineFragment;
...@@ -33,6 +32,7 @@ import com.rv.tourism.R2; ...@@ -33,6 +32,7 @@ import com.rv.tourism.R2;
import com.rv.tourism.TourismFragment; import com.rv.tourism.TourismFragment;
import com.rv.version.bean.VersionCheckBean; import com.rv.version.bean.VersionCheckBean;
import com.rv.version.util.UpdateAppUtils; import com.rv.version.util.UpdateAppUtils;
import com.xxfc.discovery.DiscoveryFragment;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
...@@ -152,7 +152,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> { ...@@ -152,7 +152,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
} else if (id == R.id.rl_camp) { } else if (id == R.id.rl_camp) {
setCurrent(TYPE_CAMP); setCurrent(TYPE_CAMP);
} else if (id == R.id.rl_found) { } else if (id == R.id.rl_found) {
// setCurrent(TYPE_FOUND); setCurrent(TYPE_FOUND);
} else if (id == R.id.rl_mine) { } else if (id == R.id.rl_mine) {
setCurrent(TYPE_MINE); setCurrent(TYPE_MINE);
} }
...@@ -163,7 +163,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> { ...@@ -163,7 +163,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
list.add(HomeFragment.getInstance(TYPE_HOME_PAGE)); list.add(HomeFragment.getInstance(TYPE_HOME_PAGE));
list.add(TourismFragment.getInstance(TYPE_TRAVEL)); list.add(TourismFragment.getInstance(TYPE_TRAVEL));
list.add(CampFragment.getInstance(TYPE_CAMP)); list.add(CampFragment.getInstance(TYPE_CAMP));
// list.add(MineFragment.getInstance(TYPE_FOUND)); list.add(DiscoveryFragment.getInstance(TYPE_FOUND));
list.add(MineFragment.getInstance(TYPE_MINE)); list.add(MineFragment.getInstance(TYPE_MINE));
return list; return list;
} }
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="MissingDefaultResource">
<item>
<bitmap android:src="@drawable/start_backgroud"
android:gravity="fill"/>
</item>
</layer-list>
\ No newline at end of file
...@@ -8,4 +8,16 @@ ...@@ -8,4 +8,16 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<!-- 给Theme设置backgroud,解决启动黑屏问题,不过这样的启动速度好像变得更慢了一些-->
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/start_back</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources> </resources>
package com.rv.home.rv.module.ui.main.adapter; package com.ruiwenliu.wrapper.adapter;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentPagerAdapter;
......
...@@ -112,6 +112,22 @@ public class GlideManager { ...@@ -112,6 +112,22 @@ public class GlideManager {
.into(image); .into(image);
} }
/**
* 加载圆角图片
*
* @param url
* @param image
* @param round
*/
public void loadRoundImage2(Object url, ImageView image, int round) {
GlideApp.with(mContext)
.load(url)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext,round)))
.into(image);
}
/** /**
* 加载圆角图片 * 加载圆角图片
* 通过RequestOptions扩展功能,override:采样率,因为ImageView就这么大,可以压缩图片,降低内存消耗,设置图片压缩比例 * 通过RequestOptions扩展功能,override:采样率,因为ImageView就这么大,可以压缩图片,降低内存消耗,设置图片压缩比例
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<color name="gray_ba242525">#ba242525</color> <color name="gray_ba242525">#ba242525</color>
<color name="gray_f8f3c9">#F8F3C9</color> <color name="gray_f8f3c9">#F8F3C9</color>
<color name="gray_30000000">#30000000</color> <color name="gray_30000000">#30000000</color>
<color name="gray_FFFCF8">#FFFCF8</color>
<!--end--> <!--end-->
......
...@@ -47,10 +47,12 @@ ...@@ -47,10 +47,12 @@
<dimen name="size_190">190dp</dimen> <dimen name="size_190">190dp</dimen>
<dimen name="size_200">200dp</dimen> <dimen name="size_200">200dp</dimen>
<dimen name="size_220">220dp</dimen> <dimen name="size_220">220dp</dimen>
<dimen name="size_230">230dp</dimen>
<dimen name="size_240">240dp</dimen> <dimen name="size_240">240dp</dimen>
<dimen name="size_245">245dp</dimen> <dimen name="size_245">245dp</dimen>
<dimen name="size_250">250dp</dimen> <dimen name="size_250">250dp</dimen>
<dimen name="size_500">500dp</dimen> <dimen name="size_500">500dp</dimen>
<dimen name="size_535">535dp</dimen>
<dimen name="size_550">550dp</dimen> <dimen name="size_550">550dp</dimen>
<dimen name="size_580">580dp</dimen> <dimen name="size_580">580dp</dimen>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp"/> <corners android:radius="50dp"/>
<solid android:color="@color/gray_EEEEEE" /> <solid android:color="@color/gray_EEEEEE" />
</shape> </shape>
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [moduleName: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
api 'com.jakewharton:butterknife:9.0.0-rc1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
annotationProcessor 'com.alibaba:arouter-compiler:1.1.4'
api project(':RvWrapper')
api project(':component_resource')
api project(':component_dialog')
api project(':component_utils')
api project(':component_control')
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.xxfc.discovery;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.xxfc.discovery.test", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxfc.discovery">
<application>
<activity android:name=".fragment.RecommendFragment"></activity>
<activity android:name=".DiscoveryFragment" />
</application>
</manifest>
\ No newline at end of file
package com.xxfc.discovery;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ruiwenliu.wrapper.adapter.TabAdapter;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper;
import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration;
import com.xxfc.discovery.adapter.DiscoveryMenuAdapter;
import com.xxfc.discovery.fragment.RecommendFragment;
import com.xxfc.discovery.presenter.DiscoveryPresenter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/**
* 发现模块
*/
public class DiscoveryFragment extends BaseFragment<DiscoveryPresenter>{
@BindView(R2.id.recyclerView)
RecyclerView recyclerView;
@BindView(R2.id.order_viewPager)
ViewPager mViewPager;
private DiscoveryMenuAdapter menuAdapter;
private TabAdapter mAdapter;
public final static int TYPE_FOR_PAYMENT = 0;//待付款
public final static int TYPE_TO_TRAVEL = 1;//待出行
public final static int TYPE_HAVE_TO_TRAVEL = 2;//已出行
public final static int TYPE_COMPLETED = 3;//已完成
public final static int TYPE_ALL_ORDER = 4;//全部
private int menuPosition;
public static DiscoveryFragment getInstance(int type) {
Bundle bundl = new Bundle();
bundl.putInt("type", type);
DiscoveryFragment fragment = new DiscoveryFragment();
fragment.setArguments(bundl);
return fragment;
}
@Override
public int getViewLayout() {
return R.layout.fragment_discovery;
}
@Override
protected void initView(Bundle savedInstanceState) {
initRecyclerView();
initViewpager();
}
@Override
protected void loadData(Bundle savedInstanceState) {
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
/**
* 初始化RecyclerView
*/
private void initRecyclerView() {
recyclerView.setLayoutManager(new GridLayoutManager(_mActivity, 4));
menuAdapter = new DiscoveryMenuAdapter();
recyclerView.setAdapter(menuAdapter);
recyclerView.addItemDecoration(new SpaceItemDecoration(5));
GallerySnapHelper snapHelper = new GallerySnapHelper();
snapHelper.attachToRecyclerView(recyclerView);
List<String> list = new ArrayList<>();
list.add(_mActivity.getString(R.string.discovery_recommend));
list.add(_mActivity.getString(R.string.discovery_pat));
list.add(_mActivity.getString(R.string.discovery_short_video));
list.add(_mActivity.getString(R.string.discovery_question_and_answer));
menuAdapter.setNewData(list);
menuAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
menuAdapter.setSelectItem(position);
mViewPager.setCurrentItem(position);
}
});
}
/**
* 初始化Viewpager
*/
private void initViewpager() {
mAdapter = new TabAdapter(getChildFragmentManager(), getListFragment());
mViewPager.setAdapter(mAdapter);
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
menuAdapter.setSelectItem(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
mViewPager.setOffscreenPageLimit(mAdapter.getCount());
menuAdapter.setSelectItem(menuPosition);
mViewPager.setCurrentItem(menuPosition);
}
private List<BaseFragment> getListFragment() {
List<BaseFragment> list = new ArrayList<>();
list.add(RecommendFragment.getInstance(TYPE_FOR_PAYMENT));
list.add(RecommendFragment.getInstance(TYPE_TO_TRAVEL));
list.add(RecommendFragment.getInstance(TYPE_HAVE_TO_TRAVEL));
list.add(RecommendFragment.getInstance(TYPE_COMPLETED));
return list;
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
mAdapter.getCurrentFragment().onActivityResult(requestCode, resultCode, data);
}
public SwitchListener switchListener = new SwitchListener() {
@Override
public void switchTab(int position) {
if (menuAdapter != null && mViewPager != null) {
menuAdapter.setSelectItem(position);
mViewPager.setCurrentItem(position);
}
}
};
/******
* 切换事件
*/
public interface SwitchListener {
void switchTab(int position);
}
}
package com.xxfc.discovery.adapter;
import android.support.v4.content.ContextCompat;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xxfc.discovery.R;
/**
*
*/
public class DiscoveryMenuAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public DiscoveryMenuAdapter() {
super(R.layout.rv_item_discovery_menu);
}
private int selectPosition;
@Override
protected void convert(BaseViewHolder helper, String item) {
helper.setText(R.id.tv_title, item);
if (selectPosition == getPosition(item)) {
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.gray_FFB74B));
helper.setGone(R.id.view_line, true);
} else {
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.textMain));
helper.setGone(R.id.view_line, false);
}
}
public int getPosition(String item) {
return mData.indexOf(item);
}
public void setSelectItem(int position) {
this.selectPosition = position;
notifyDataSetChanged();
}
/**
* 获取选中的菜单
*
* @return
*/
public int getSelectPosition() {
return selectPosition;
}
}
package com.xxfc.discovery.fragment;
import android.os.Bundle;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.xxfc.discovery.R;
import com.xxfc.discovery.presenter.DiscoveryPresenter;
public class RecommendFragment extends BaseFragment<DiscoveryPresenter> {
public static RecommendFragment getInstance(int type) {
Bundle bundl = new Bundle();
bundl.putInt("type", type);
RecommendFragment fragment = new RecommendFragment();
fragment.setArguments(bundl);
return fragment;
}
@Override
public int getViewLayout() {
return R.layout.fragment_recommend;
}
@Override
protected void initView(Bundle savedInstanceState) {
}
@Override
protected void loadData(Bundle savedInstanceState) {
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
}
package com.xxfc.discovery.presenter;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.presenter.MvpPresenter;
public class DiscoveryPresenter extends MvpPresenter {
@Override
/**
* 域名地址
*/
public String getBaseUrl() {
return RvFrameConfig.AUTH_POST;
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".DiscoveryFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:gravity="center_vertical"
android:orientation="horizontal">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="0dp"
android:layout_weight="4"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content">
<ImageView
android:layout_width="@dimen/size_25"
android:layout_height="@dimen/size_25"
android:layout_marginRight="@dimen/size_15"
android:src="@drawable/discover_ixon_more"/>
</LinearLayout>
</LinearLayout>
<include layout="@layout/common_line" />
<android.support.v4.view.ViewPager
android:id="@+id/order_viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragment.RecommendFragment">
</android.support.constraint.ConstraintLayout>
\ 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:orientation="vertical"
android:gravity="center_horizontal"
android:layout_height="wrap_content">
<TextView
android:layout_marginTop="@dimen/size_15"
android:id="@+id/tv_title"
android:textSize="@dimen/text_16"
android:textColor="@color/textMain"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
/>
<View
android:background="@color/gray_FFB74B"
android:layout_marginTop="@dimen/size_15"
android:id="@+id/view_line"
android:layout_width="@dimen/size_60"
android:layout_height="@dimen/size_1"/>
</LinearLayout>
<resources>
<string name="app_name">module_discovery</string>
<string name="discovery_recommend">推荐</string>
<string name="discovery_pat">拍拍</string>
<string name="discovery_short_video">短视频</string>
<string name="discovery_question_and_answer">问答</string>
</resources>
package com.xxfc.discovery;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
...@@ -1119,7 +1119,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser ...@@ -1119,7 +1119,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
latLatitude = location.getLatitude(); latLatitude = location.getLatitude();
lonLongitude = location.getLongitude(); lonLongitude = location.getLongitude();
mLatLng = new LatLng(location.getLatitude(), location.getLongitude()); mLatLng = new LatLng(location.getLatitude(), location.getLongitude());
getCityId =0;
outCityId = 0;
headTvGetCity.setText(location.getCity()); headTvGetCity.setText(location.getCity());
headTvOutCity.setText(location.getCity()); headTvOutCity.setText(location.getCity());
tvRvCity.setText(location.getCity()); tvRvCity.setText(location.getCity());
......
...@@ -16,6 +16,7 @@ public class SelectedEventsAdapter extends BaseQuickAdapter<Integer, BaseGlideHo ...@@ -16,6 +16,7 @@ public class SelectedEventsAdapter extends BaseQuickAdapter<Integer, BaseGlideHo
@Override @Override
protected void convert(BaseGlideHolder helper, Integer integer) { protected void convert(BaseGlideHolder helper, Integer integer) {
// GlideManager.getInstance(mContext).loadRoundImage(string, (ImageView)helper.getView(R.id.iv_activity),6); // GlideManager.getInstance(mContext).loadRoundImage(string, (ImageView)helper.getView(R.id.iv_activity),6);
helper.setImageDrawable(R.id.iv_activity,mContext.getResources().getDrawable(integer)); // helper.setImageDrawable(R.id.iv_activity,mContext.getResources().getDrawable(integer));
GlideManager.getInstance(mContext).loadRoundImage2(integer, (ImageView)helper.getView(R.id.iv_activity),6);
} }
} }
...@@ -21,7 +21,7 @@ import com.ruiwenliu.wrapper.weight.TitleView; ...@@ -21,7 +21,7 @@ import com.ruiwenliu.wrapper.weight.TitleView;
import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper; import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper;
import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration; import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration;
import com.rv.home.rv.module.basic.presenter.PickerPresenter; import com.rv.home.rv.module.basic.presenter.PickerPresenter;
import com.rv.home.rv.module.ui.main.adapter.TabAdapter; import com.ruiwenliu.wrapper.adapter.TabAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.OrderMenuAdapter; import com.rv.home.rv.module.ui.main.home.adapter.OrderMenuAdapter;
import java.util.ArrayList; import java.util.ArrayList;
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/size_8"/> <corners android:radius="@dimen/size_50"/>
<solid android:color="@color/gray_50ffffff" /> <solid android:color="@color/gray_50ffffff" />
</shape> </shape>
\ No newline at end of file
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
android:background="@color/colorLine" android:background="@color/colorLine"
android:orientation="vertical"> android:orientation="vertical">
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout <com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/refresh" android:id="@+id/refresh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -38,18 +37,16 @@ ...@@ -38,18 +37,16 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:layout_marginTop="@dimen/size_230">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/size_240">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="@dimen/size_15" android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:layout_marginTop="@dimen/size_15"
android:layout_marginBottom="@dimen/size_25"
app:cardBackgroundColor="@color/colorWrite" app:cardBackgroundColor="@color/colorWrite"
app:cardCornerRadius="10dp" app:cardCornerRadius="10dp"
app:cardElevation="15dp"> app:cardElevation="15dp">
...@@ -246,10 +243,10 @@ ...@@ -246,10 +243,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:background="@drawable/shape_rv_bg_yellow_small" android:background="@drawable/shape_rv_bg_yellow_small"
android:paddingLeft="@dimen/size_5" android:paddingTop="@dimen/size_1"
android:paddingTop="@dimen/size_3" android:paddingBottom="@dimen/size_1"
android:paddingRight="@dimen/size_5" android:paddingLeft="@dimen/size_3"
android:paddingBottom="@dimen/size_3" android:paddingRight="@dimen/size_3"
android:text="@string/rv_get" android:text="@string/rv_get"
android:textColor="@color/colorWrite" android:textColor="@color/colorWrite"
android:textSize="@dimen/text_10" /> android:textSize="@dimen/text_10" />
...@@ -308,10 +305,10 @@ ...@@ -308,10 +305,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:background="@drawable/shape_rv_main_small" android:background="@drawable/shape_rv_main_small"
android:paddingLeft="@dimen/size_5" android:paddingTop="@dimen/size_1"
android:paddingTop="@dimen/size_3" android:paddingBottom="@dimen/size_1"
android:paddingRight="@dimen/size_5" android:paddingLeft="@dimen/size_3"
android:paddingBottom="@dimen/size_3" android:paddingRight="@dimen/size_3"
android:text="@string/rv_out" android:text="@string/rv_out"
android:textColor="@color/colorWrite" android:textColor="@color/colorWrite"
android:textSize="@dimen/text_10" /> android:textSize="@dimen/text_10" />
...@@ -502,7 +499,7 @@ ...@@ -502,7 +499,7 @@
</LinearLayout> </LinearLayout>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
</LinearLayout> </LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>
<!--每周特惠--> <!--每周特惠-->
...@@ -624,7 +621,7 @@ ...@@ -624,7 +621,7 @@
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView_content" android:id="@+id/recyclerView_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/size_535"
android:layout_marginTop="@dimen/size_10" android:layout_marginTop="@dimen/size_10"
android:paddingLeft="@dimen/size_10" android:paddingLeft="@dimen/size_10"
android:paddingRight="@dimen/size_10" /> android:paddingRight="@dimen/size_10" />
...@@ -642,7 +639,7 @@ ...@@ -642,7 +639,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_40" android:layout_marginTop="@dimen/size_30"
android:paddingLeft="@dimen/size_15" android:paddingLeft="@dimen/size_15"
android:text="精选活动" android:text="精选活动"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
...@@ -651,7 +648,7 @@ ...@@ -651,7 +648,7 @@
<LinearLayout <LinearLayout
android:id="@+id/ll_item_activity_all" android:id="@+id/ll_item_activity_all"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_30" android:layout_height="@dimen/size_25"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="@dimen/size_15" android:paddingLeft="@dimen/size_15"
...@@ -694,6 +691,7 @@ ...@@ -694,6 +691,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5" android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_5"
android:paddingLeft="@dimen/size_15" android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15" android:paddingRight="@dimen/size_15"
android:text="精选优质旅游路线,满足你的出行需求" android:text="精选优质旅游路线,满足你的出行需求"
...@@ -723,12 +721,13 @@ ...@@ -723,12 +721,13 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_30" android:layout_marginTop="@dimen/size_20"
android:paddingLeft="@dimen/size_15" android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15" android:paddingRight="@dimen/size_15"
android:text="房车发烧友" android:text="房车发烧友"
...@@ -768,7 +767,7 @@ ...@@ -768,7 +767,7 @@
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/size_220"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/aa1" /> android:src="@drawable/aa1" />
...@@ -842,7 +841,7 @@ ...@@ -842,7 +841,7 @@
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/size_250"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/aa4" /> android:src="@drawable/aa4" />
...@@ -924,7 +923,7 @@ ...@@ -924,7 +923,7 @@
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/size_250"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/aa33" /> android:src="@drawable/aa33" />
...@@ -998,7 +997,7 @@ ...@@ -998,7 +997,7 @@
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/size_200"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/aa2" /> android:src="@drawable/aa2" />
...@@ -1069,11 +1068,11 @@ ...@@ -1069,11 +1068,11 @@
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView_rv_enthusiast" android:id="@+id/recyclerView_rv_enthusiast"
android:layout_width="match_parent" android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:paddingLeft="@dimen/size_8" android:paddingLeft="@dimen/size_8"
android:paddingRight="@dimen/size_8" /> android:paddingRight="@dimen/size_8"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -1102,7 +1101,6 @@ ...@@ -1102,7 +1101,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_common_small" android:layout_marginRight="@dimen/ui_dimen_common_small"
android:text="东莞市"
android:textColor="@color/colorWrite" android:textColor="@color/colorWrite"
android:textSize="@dimen/_ui_text_size_h6" /> android:textSize="@dimen/_ui_text_size_h6" />
......
...@@ -65,15 +65,7 @@ ...@@ -65,15 +65,7 @@
<item name="android:windowIsTranslucent">true</item> <item name="android:windowIsTranslucent">true</item>
</style> </style>
<!-- 给Theme设置backgroud,解决启动黑屏问题,不过这样的启动速度好像变得更慢了一些-->
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/start_backgroud</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
<style name="style_line_margin_left_and_right_15"> <style name="style_line_margin_left_and_right_15">
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
......
...@@ -16,7 +16,9 @@ import android.widget.TextView; ...@@ -16,7 +16,9 @@ import android.widget.TextView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.base.utils.tools.android.IntentUtil; import com.base.utils.tools.android.IntentUtil;
import com.base.utils.ui.datetime.selector.util.TextUtil;
import com.base.utils.ui.image.round.RoundImageView; import com.base.utils.ui.image.round.RoundImageView;
import com.ruiwenliu.wrapper.bean.BeanUserInfo;
import com.ruiwenliu.wrapper.browse.ActivityImageBrowseInt; import com.ruiwenliu.wrapper.browse.ActivityImageBrowseInt;
import com.frame.base.bus.LoginSuccessfulEvent; import com.frame.base.bus.LoginSuccessfulEvent;
import com.frame.base.bus.Observer; import com.frame.base.bus.Observer;
...@@ -114,6 +116,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -114,6 +116,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
private UserInfoBean.UserInfo info; private UserInfoBean.UserInfo info;
private BeanUserInfo.UserInfo userInfo = null;
public static MineFragment getInstance(int type) { public static MineFragment getInstance(int type) {
Bundle bundl = new Bundle(); Bundle bundl = new Bundle();
...@@ -136,6 +139,16 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -136,6 +139,16 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
initRxBus(); initRxBus();
initRefresh(); initRefresh();
String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
if (!TextUtil.isEmpty(spStringCode)) {
userInfo = JSON.parseObject(spStringCode, BeanUserInfo.UserInfo.class);
if (userInfo !=null){
GlideManager.getInstance(_mActivity).loadImage(userInfo.getHeadimgurl(), ivAvatar);
tvNickname.setText(userInfo.getUsername());
}
}
if (TextUtils.isEmpty(OkGoUtil.getToken())) { if (TextUtils.isEmpty(OkGoUtil.getToken())) {
tvNickname.setVisibility(View.GONE); tvNickname.setVisibility(View.GONE);
((View) ivMember.getParent()).setVisibility(View.GONE); ((View) ivMember.getParent()).setVisibility(View.GONE);
......
...@@ -6,7 +6,6 @@ import android.os.Handler; ...@@ -6,7 +6,6 @@ import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.os.Message; import android.os.Message;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
...@@ -24,7 +23,7 @@ import com.ruiwenliu.wrapper.weight.TitleView; ...@@ -24,7 +23,7 @@ import com.ruiwenliu.wrapper.weight.TitleView;
import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper; import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper;
import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration; import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration;
import com.rv.home.rv.module.basic.presenter.CommonPresenter; import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.adapter.TabAdapter; import com.ruiwenliu.wrapper.adapter.TabAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.OrderMenuAdapter; import com.rv.home.rv.module.ui.main.home.adapter.OrderMenuAdapter;
import com.rv.member.bean.UserInfoBean; import com.rv.member.bean.UserInfoBean;
import com.rv.member.fragment.AllDayDetailFragment; import com.rv.member.fragment.AllDayDetailFragment;
......
//include ':WXPay' //include ':WXPay'
include ':RvFrame', ':plugin_calendar', ':plugin_time' include ':RvFrame', ':plugin_calendar', ':plugin_time', ':module_discovery'
include ':RvTravel' include ':RvTravel'
include ':RvClient' include ':RvClient'
include ':RvWrapper' include ':RvWrapper'
......
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