Commit e096abfc authored by jianglx's avatar jianglx

Merge branch 'master-video' of http://113.105.137.151:22280/lify/rvapp into dev_im

# Conflicts:
#	plugin_im/src/main/res/values/styles.xml
parents 2ad9e96c 35df5a84
...@@ -7,15 +7,12 @@ import android.os.Bundle; ...@@ -7,15 +7,12 @@ import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import com.ruiwenliu.wrapper.SPConstance; import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.base.BaseActivity; import com.ruiwenliu.wrapper.base.BaseActivity;
import com.ruiwenliu.wrapper.base.BaseBean; import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.weight.TitleView; import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.CacheEnum; import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.Cookie; import com.rv.component.utils.Cookie;
import com.rv.component.utils.DateUtils;
import com.rv.component.utils.LogUtil; import com.rv.component.utils.LogUtil;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter; import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.rv.component.utils.RvCache; import com.rv.component.utils.RvCache;
...@@ -23,9 +20,7 @@ import com.rv.im.AppConfig; ...@@ -23,9 +20,7 @@ import com.rv.im.AppConfig;
import com.rv.im.bean.ImConfig; import com.rv.im.bean.ImConfig;
import com.rv.im.bean.ImConfigBean; import com.rv.im.bean.ImConfigBean;
import com.yuyife.okgo.OkGoUtil; import com.yuyife.okgo.OkGoUtil;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import io.reactivex.Flowable; import io.reactivex.Flowable;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.annotations.NonNull; import io.reactivex.annotations.NonNull;
......
package com.rv.component.utils;
import android.content.Context;
import android.content.SharedPreferences;
import java.lang.ref.WeakReference;
public class Cookie {
private final static String COOKIE_FILE = "cookie";
private static SharedPreferences preferences;
private static WeakReference<Context> weakReference = null;
public static void init(Context context) {
weakReference = new WeakReference<>(context);
}
private static SharedPreferences getPreference() {
if (preferences == null) {
preferences = weakReference.get().getSharedPreferences(COOKIE_FILE, Context.MODE_PRIVATE);
}
return preferences;
}
public static void save(Context context, String key, String s) {
getPreference().edit().putString(key, s).commit();
}
public static void save(Context context, String key, int i) {
getPreference().edit().putInt(key, i).commit();
}
public static void save(Context context, String key, long l) {
getPreference().edit().putLong(key, l).commit();
}
public static void save(Context context, String key, boolean b) {
getPreference().edit().putBoolean(key, b).commit();
}
public static void save(Context context, String key, float f) {
getPreference().edit().putFloat(key, f).commit();
}
public static String getStringValue(Context context, String key) {
return getStringValue(context, key, "");
}
public static String getStringValue(Context context, String key, String def) {
return getPreference().getString(key, def);
}
public static int getIntValue(Context context, String key) {
return getIntValue(context, key, -1);
}
public static int getIntValue(Context context, String key, int def) {
return getPreference().getInt(key, def);
}
public static long getLongValue(Context context, String key) {
return getLongValue(context, key, 0l);
}
public static long getLongValue(Context context, String key, long def) {
return getPreference().getLong(key, def);
}
public static float getFloatValue(Context context, String key) {
return getFloatValue(context, key, 0f);
}
public static float getFloatValue(Context context, String key, float def) {
return getPreference().getFloat(key, def);
}
public static boolean getBooleanValue(Context context, String key) {
return getBooleanValue(context, key, false);
}
public static boolean getBooleanValue(Context context, String key, boolean def) {
return getPreference().getBoolean(key, def);
}
public static void clear(Context context) {
getPreference().edit().clear().commit();
}
}
...@@ -106,24 +106,24 @@ public class PatGeneratePosterActivity extends BaseStatusActivity<PickerPresente ...@@ -106,24 +106,24 @@ public class PatGeneratePosterActivity extends BaseStatusActivity<PickerPresente
imgQrcode.setImageBitmap(bitmap); imgQrcode.setImageBitmap(bitmap);
} }
GlideOptions options = GlideOptions.placeholderOf(com.ruiwenliu.wrapper.R.drawable.glide_icon_placeholder). // GlideOptions options = GlideOptions.placeholderOf(com.ruiwenliu.wrapper.R.drawable.glide_icon_placeholder).
error(com.ruiwenliu.wrapper.R.drawable.glide_icon_error); // error(com.ruiwenliu.wrapper.R.drawable.glide_icon_error);
TransformationUtil utils = new TransformationUtil(imgBillTop); // TransformationUtil utils = new TransformationUtil(imgBillTop);
Glide.with(this) // Glide.with(this)
.asBitmap() // .asBitmap()
.load(iconUrl) // .load(iconUrl)
.apply(options) // .apply(options)
.apply(RequestOptions // .apply(RequestOptions
.bitmapTransform(new RoundedCorners(12)).override(imgBillTop.getWidth(), imgBillTop.getHeight()) // .bitmapTransform(new RoundedCorners(12)).override(imgBillTop.getWidth(), imgBillTop.getHeight())
.disallowHardwareConfig()) // .disallowHardwareConfig())
.into(utils); // .into(utils);
// GlideManager.getInstance(mActivity).loadRoundImage(, imgBillTop, 8); GlideManager.getInstance(mActivity).loadRoundImage(iconUrl, imgBillTop, 8);
tvContent.setText(content); tvContent.setText(content);
if (!TextUtils.isEmpty(userUrl)) { if (!TextUtils.isEmpty(userUrl)) {
GlideManager.getInstance(mActivity).loadCircleImage(userUrl, ringHeader); GlideManager.getInstance(mActivity).loadCircleImage(userUrl, ringHeader);
}else { } else {
ringHeader.setImageResource(R.drawable.icon_bill_defult); ringHeader.setImageResource(R.drawable.icon_bill_defult);
} }
tvUsername.setText(userName); tvUsername.setText(userName);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" /> android:scaleType="centerCrop" />
<TextView <TextView
android:id="@+id/tv_content" android:id="@+id/tv_content"
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
android:layout_marginTop="@dimen/size_5" android:layout_marginTop="@dimen/size_5"
android:drawableLeft="@drawable/common_icon_logo_small" android:drawableLeft="@drawable/common_icon_logo_small"
android:drawablePadding="@dimen/size_3" android:drawablePadding="@dimen/size_3"
android:text="房车让生活更美好" android:text="滴房车·让生活更美好"
android:textColor="@color/gray_B4B4B4" android:textColor="@color/gray_B4B4B4"
android:textSize="@dimen/text_8" /> android:textSize="@dimen/text_8" />
......
...@@ -10,6 +10,7 @@ import android.widget.TextView; ...@@ -10,6 +10,7 @@ import android.widget.TextView;
import com.rv.home.rv.module.ui.main.home.order.bean.OrderListBean; import com.rv.home.rv.module.ui.main.home.order.bean.OrderListBean;
import java.lang.reflect.Field;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
...@@ -126,6 +127,7 @@ public class MyTimerView extends TextView { ...@@ -126,6 +127,7 @@ public class MyTimerView extends TextView {
; ;
private Handler handler = new Handler(Looper.getMainLooper()) { private Handler handler = new Handler(Looper.getMainLooper()) {
@Override @Override
public void handleMessage(Message msg) { public void handleMessage(Message msg) {
......
...@@ -15,16 +15,6 @@ ...@@ -15,16 +15,6 @@
<!-- All customizations that are NOT specific to a particular API-level can go here. --> <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style> </style>
<!--&lt;!&ndash; 给Theme设置backgroud,解决启动黑屏问题,不过这样的启动速度好像变得更慢了一些&ndash;&gt;-->
<!--<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">-->
<!--<item name="android:windowBackground">@drawable/live_backgroud3</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="IMAnimationStyle" parent="@android:style/Animation.Activity"> <style name="IMAnimationStyle" parent="@android:style/Animation.Activity">
<item name="android:activityOpenEnterAnimation">@anim/pop_in</item> <item name="android:activityOpenEnterAnimation">@anim/pop_in</item>
<item name="android:activityOpenExitAnimation">@anim/anim_not_change</item> <item name="android:activityOpenExitAnimation">@anim/anim_not_change</item>
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
android:layout_marginTop="@dimen/size_5" android:layout_marginTop="@dimen/size_5"
android:drawableLeft="@drawable/common_icon_logo_small" android:drawableLeft="@drawable/common_icon_logo_small"
android:drawablePadding="@dimen/size_3" android:drawablePadding="@dimen/size_3"
android:text="房车让生活更美好" android:text="滴房车·让生活更美好"
android:textColor="@color/gray_B4B4B4" android:textColor="@color/gray_B4B4B4"
android:textSize="@dimen/text_8" /> android:textSize="@dimen/text_8" />
</LinearLayout> </LinearLayout>
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
android:layout_marginTop="@dimen/size_5" android:layout_marginTop="@dimen/size_5"
android:drawableLeft="@drawable/common_icon_logo_small" android:drawableLeft="@drawable/common_icon_logo_small"
android:drawablePadding="@dimen/size_3" android:drawablePadding="@dimen/size_3"
android:text="房车让生活更美好" android:text="滴房车·让生活更美好"
android:textColor="@color/gray_B4B4B4" android:textColor="@color/gray_B4B4B4"
android:textSize="@dimen/text_8" /> android:textSize="@dimen/text_8" />
</LinearLayout> </LinearLayout>
......
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