Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
This commit is contained in:
@ -75,7 +75,6 @@ public class GetLoginDataUtils {
|
||||
public IUiListener QqLoginListener = new IUiListener() {
|
||||
@Override
|
||||
public void onComplete(Object o) {
|
||||
Toast.makeText(mContext, "登录成功", Toast.LENGTH_SHORT).show();
|
||||
Utils.log(GetLoginDataUtils.class.getSimpleName(), "QQ 登录成功");
|
||||
if (o instanceof JSONObject) {
|
||||
JSONObject jsonObject = (JSONObject) o;
|
||||
|
||||
@ -239,11 +239,36 @@ public class LibaoUtils {
|
||||
libaoBtn.setBackgroundResource(R.drawable.textview_blue_style);
|
||||
break;
|
||||
case "repeatLing":
|
||||
libaoBtn.setText("再领一个");
|
||||
libaoBtn.setBackgroundResource(R.drawable.textview_cancel_up);
|
||||
if (adapter == null) {
|
||||
int[][] states3 = new int[2][];
|
||||
states3[0] = new int[]{android.R.attr.state_pressed};
|
||||
states3[1] = new int[]{};
|
||||
int[] colors3 = new int[]{Color.WHITE,
|
||||
Color.parseColor("#06D0A8")};
|
||||
ColorStateList sl3 = new ColorStateList(states3, colors3);
|
||||
libaoBtn.setText("已领取");
|
||||
libaoBtn.setBackgroundResource(R.drawable.libao_linged_style);
|
||||
libaoBtn.setTextColor(sl3);
|
||||
} else {
|
||||
libaoBtn.setText("再领一个");
|
||||
libaoBtn.setBackgroundResource(R.drawable.textview_cancel_up);
|
||||
}
|
||||
break;
|
||||
case "repeatLinged":
|
||||
libaoBtn.setText("再领一个");
|
||||
libaoBtn.setBackgroundResource(R.drawable.textview_green_style);
|
||||
if (adapter == null) {
|
||||
int[][] states4 = new int[2][];
|
||||
states4[0] = new int[]{android.R.attr.state_pressed};
|
||||
states4[1] = new int[]{};
|
||||
int[] colors4 = new int[]{Color.WHITE,
|
||||
Color.parseColor("#06D0A8")};
|
||||
ColorStateList sl4 = new ColorStateList(states4, colors4);
|
||||
libaoBtn.setText("已领取");
|
||||
libaoBtn.setBackgroundResource(R.drawable.libao_linged_style);
|
||||
libaoBtn.setTextColor(sl4);
|
||||
} else {
|
||||
libaoBtn.setText("再领一个");
|
||||
libaoBtn.setBackgroundResource(R.drawable.textview_green_style);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
libaoBtn.setBackgroundResource(R.drawable.textview_cancel_style);
|
||||
@ -294,7 +319,7 @@ public class LibaoUtils {
|
||||
if (status.equals("repeatLing")) {
|
||||
DialogUtils.showWarningDialog(context, "礼包刷新提醒"
|
||||
, "礼包每天0点刷新,换新区或者换新角色需要继续领取礼包的童鞋,请于明天0点之后回来即可[再领一个](已使用过礼包的角色不能重复使用)"
|
||||
,"知道了", null, null, null);
|
||||
, "知道了", null, null, null);
|
||||
} else {
|
||||
libaoLing(context, libaoBtn, libaoEntity, adapter, isInstallRequired, libaoDao, null, entrance);
|
||||
}
|
||||
@ -620,7 +645,7 @@ public class LibaoUtils {
|
||||
}
|
||||
|
||||
|
||||
// 合并List<LibaoStatusEntity> 和 List<LibaoEntity> 并检查重复领取的礼包
|
||||
// 合并List<LibaoStatusEntity> 和 List<LibaoEntity>
|
||||
public static void initLiBaoEntity(LibaoDao libaoDao, List<LibaoStatusEntity> statusList,
|
||||
List<LibaoEntity> libaoEntities, Context mContext) {
|
||||
|
||||
@ -644,6 +669,7 @@ public class LibaoUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (LibaoEntity libaoEntity : libaoEntities) {
|
||||
for (LibaoStatusEntity libaoStatusEntity : statusList) {
|
||||
if (libaoEntity.getId().equals(libaoStatusEntity.getId())) {
|
||||
@ -651,26 +677,29 @@ public class LibaoUtils {
|
||||
libaoEntity.setTotal(libaoStatusEntity.getTotal());
|
||||
|
||||
String beforeStatus = libaoStatusEntity.getBeforeStatus();
|
||||
int repeat = libaoEntity.getRepeat();
|
||||
if (repeat > 0
|
||||
&& libaoDao.isCanLing(libaoEntity.getId(), mContext)
|
||||
&& ("ling".equals(beforeStatus) || "tao".equals(beforeStatus))) { // 判断是否可以重复领取
|
||||
if ("ling".equals(beforeStatus)) {
|
||||
if (libaoDao.repeatedLingedCount(libaoStatusEntity.getId()) >= repeat) {
|
||||
libaoEntity.setStatus(libaoStatusEntity.getStatus());
|
||||
} else {
|
||||
libaoEntity.setStatus(beforeStatus);
|
||||
}
|
||||
} else {
|
||||
if (libaoDao.repeatedTaoedCount(libaoStatusEntity.getId()) >= repeat) {
|
||||
libaoEntity.setStatus(libaoStatusEntity.getStatus());
|
||||
} else {
|
||||
libaoEntity.setStatus(beforeStatus);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
libaoEntity.setStatus(libaoStatusEntity.getStatus());
|
||||
if (TextUtils.isEmpty(beforeStatus)) {
|
||||
beforeStatus = libaoStatusEntity.getStatus();
|
||||
}
|
||||
// int repeat = libaoEntity.getRepeat();
|
||||
// if (repeat > 0
|
||||
// && libaoDao.isCanLing(libaoEntity.getId(), mContext)
|
||||
// && ("ling".equals(beforeStatus) || "tao".equals(beforeStatus))) { // 判断是否可以重复领取
|
||||
// if ("ling".equals(beforeStatus)) {
|
||||
// if (libaoDao.repeatedLingedCount(libaoStatusEntity.getId()) >= repeat) {
|
||||
// libaoEntity.setStatus(libaoStatusEntity.getStatus());
|
||||
// } else {
|
||||
// libaoEntity.setStatus(beforeStatus);
|
||||
// }
|
||||
// } else {
|
||||
// if (libaoDao.repeatedTaoedCount(libaoStatusEntity.getId()) >= repeat) {
|
||||
// libaoEntity.setStatus(libaoStatusEntity.getStatus());
|
||||
// } else {
|
||||
// libaoEntity.setStatus(beforeStatus);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
libaoEntity.setStatus(libaoStatusEntity.getStatus());
|
||||
// }
|
||||
libaoEntity.setBeforeStatus(beforeStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public class DownloadNotification {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("path", downloadEntity.getPath());
|
||||
intent.setAction(ACTION_INSTALL);
|
||||
final int requestCode = downloadEntity.getUrl().hashCode();
|
||||
final int requestCode = downloadEntity.getPackageName().hashCode();
|
||||
final PendingIntent pendingIntent = PendingIntent.getBroadcast(context, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
String text;
|
||||
String title;
|
||||
|
||||
@ -234,7 +234,9 @@ public class LibaoDetailActivity extends BaseActivity implements LibaoDetailAdap
|
||||
(("linged").equals(status) || ("taoed").equals(status)) &&
|
||||
("ling".equals(beforeStatus) || "tao".equals(beforeStatus))) {
|
||||
LibaoDao libaoDao = new LibaoDao(this);
|
||||
if (libaoDao.isCanLing(mLibaoEntity.getLibaoId(), this)) { // 再次检查重复重复领取条件,防止再礼包列表逗留时间过长,导致到了可领取时间
|
||||
|
||||
//TODO getId()/getLibaoId()???
|
||||
if (libaoDao.isCanLing(mLibaoEntity.getId(), this)) { // 再次检查重复重复领取条件,防止再礼包列表逗留时间过长,导致到了可领取时间
|
||||
handler.sendEmptyMessage(1);
|
||||
} else {
|
||||
mLibaoEntity.setStatus("repeatLing"); // 预备重复领取
|
||||
|
||||
@ -124,11 +124,11 @@ public class LoginActivity extends BaseActivity {
|
||||
if (mIsOlderUser) {
|
||||
mOldUserFragment = alterFragment(transaction, LoginOldUserFragment.class);
|
||||
initTitle("老用户登录");
|
||||
mOldUserIcon.setVisibility(View.GONE);
|
||||
// mOldUserIcon.setVisibility(View.GONE);
|
||||
} else {
|
||||
mLoginFragment = alterFragment(transaction, LoginFragment.class);
|
||||
initTitle("登录光环助手");
|
||||
mOldUserIcon.setVisibility(View.VISIBLE);
|
||||
// mOldUserIcon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
transaction.commit();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.gh.gamecenter;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
@ -696,9 +697,9 @@ public class MainActivity extends BaseActivity {
|
||||
// 执行跳转事件
|
||||
handler.postDelayed(skipRun, 500);
|
||||
|
||||
if (sp.getBoolean("changeDefaultIcon", false) && sp.getInt("default_user_icon", 0) != 0) {
|
||||
postDefaultIcon(sp.getInt("default_user_icon", 0));
|
||||
}
|
||||
// if (sp.getBoolean("changeDefaultIcon", false) && sp.getInt("default_user_icon", 0) != 0) {
|
||||
// postDefaultIcon(sp.getInt("default_user_icon", 0));
|
||||
// }
|
||||
|
||||
getSuggestionType();
|
||||
|
||||
@ -719,9 +720,9 @@ public class MainActivity extends BaseActivity {
|
||||
super.onDestroy();
|
||||
DownloadManager.getInstance(this).removeObserver(dataWatcher);
|
||||
|
||||
if (sp.getBoolean("changeDefaultIcon", false) && sp.getInt("default_user_icon", 0) != 0) {
|
||||
postDefaultIcon(sp.getInt("default_user_icon", 0));
|
||||
}
|
||||
// if (sp.getBoolean("changeDefaultIcon", false) && sp.getInt("default_user_icon", 0) != 0) {
|
||||
// postDefaultIcon(sp.getInt("default_user_icon", 0));
|
||||
// }
|
||||
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
@ -798,82 +799,6 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
// // 更新用户使用的助手信息
|
||||
// private void updateUserGhzs() {
|
||||
// String version_code = sp.getString("version_code", null);
|
||||
// String version_name = sp.getString("version_name", null);
|
||||
// String channel = sp.getString("channel", null);
|
||||
//
|
||||
// final String versionCode = PackageUtils.getVersionCode(MainActivity.this);
|
||||
// final String versionName = PackageUtils.getVersionName(MainActivity.this);
|
||||
// final String packageChannel = AppController.getInstance().getChannel();
|
||||
// if ((TextUtils.isEmpty(version_code) || TextUtils.isEmpty(version_name) || TextUtils.isEmpty(channel))
|
||||
// || (!version_code.equals(versionCode) || !version_name.equals(versionName) || !channel.equals(packageChannel))) {
|
||||
// TokenUtils.getToken(MainActivity.this, true)
|
||||
// .flatMap(new Func1<String, Observable<ResponseBody>>() {
|
||||
// @Override
|
||||
// public Observable<ResponseBody> call(String token) {
|
||||
// Map<String, String> params = new ArrayMap<>();
|
||||
// params.put("version_code", versionCode);
|
||||
// params.put("version_name", versionName);
|
||||
// params.put("channel", packageChannel);
|
||||
// RequestBody body = RequestBody.create(MediaType.parse("application/json"),
|
||||
// new JSONObject(params).toString());
|
||||
// return RetrofitManager.getApi().postGhzs(token, body);
|
||||
// }
|
||||
// }).subscribeOn(Schedulers.io())
|
||||
// .observeOn(Schedulers.io())
|
||||
// .subscribe(new Response<ResponseBody>() {
|
||||
// @Override
|
||||
// public void onResponse(ResponseBody response) {
|
||||
// SharedPreferences.Editor editor = sp.edit();
|
||||
// editor.putString("version_code", versionCode);
|
||||
// editor.putString("version_name", versionName);
|
||||
// editor.putString("channel", packageChannel);
|
||||
// editor.apply();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// 初始化关注
|
||||
private void initConcern() {
|
||||
String versionName = PackageUtils.getVersionName(MainActivity.this);
|
||||
if ("2.3".equals(versionName) && !sp.getBoolean("isSwitchConcern", false)) {
|
||||
// 针对助手2.3版本关注数据的迁移
|
||||
RetrofitManager.getApi().getConcernData(TokenUtils.getDeviceId(MainActivity.this))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Response<List<String>>() {
|
||||
@Override
|
||||
public void onResponse(final List<String> response) {
|
||||
if (response.size() != 0) {
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json"),
|
||||
new JSONArray(response).toString());
|
||||
RetrofitManager.getApi()
|
||||
.putConcern(LoginUtils.getToken(MainActivity.this), body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribe(new Response<ResponseBody>());
|
||||
}
|
||||
sp.edit().putBoolean("isSwitchConcern", true).apply();
|
||||
getConcernDigest(response);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RetrofitManager.getApi()
|
||||
.getConcern(LoginUtils.getToken(this))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribe(new Response<List<String>>() {
|
||||
@Override
|
||||
public void onResponse(List<String> response) {
|
||||
getConcernDigest(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void getConcernDigest(final List<String> arrGameId) {
|
||||
final ArrayList<GameEntity> concernDigest = new ArrayList<>();
|
||||
|
||||
@ -963,6 +888,11 @@ public class MainActivity extends BaseActivity {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMainThread(EBPackage busFour) {
|
||||
final String packageName = busFour.getPackageName();
|
||||
if("安装".equals(busFour.getType())) { // 删除下载完成 弹窗
|
||||
NotificationManager nManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
nManager.cancel(packageName.hashCode());
|
||||
}
|
||||
|
||||
if ("安装".equals(busFour.getType())) {
|
||||
// 添加进已安装map中
|
||||
PackageManager.addInstalled(packageName);
|
||||
@ -1089,7 +1019,7 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
// 提交默认头像
|
||||
private void postDefaultIcon(final int i) {
|
||||
private void postDefaultIcon(final int i) { // TODO 是否删除
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("icon_key", "icon" + i);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json"),
|
||||
|
||||
@ -482,7 +482,7 @@ public class SuggestionActivity extends BaseActivity implements SuggestTypeAdapt
|
||||
Utils.log("===========" + result);
|
||||
int statusCode = result.getInt("statusCode");
|
||||
if (statusCode == HttpURLConnection.HTTP_OK) {
|
||||
picArray.put(result.getString("img"));
|
||||
picArray.put(result.getString("icon"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@ -162,7 +162,8 @@ public class UserInfoEditActivity extends BaseActivity implements LoginUtils.onC
|
||||
if (!TextUtils.isEmpty(value)) {
|
||||
LoginUtils.changeUserInfo(this, this, value, mEditType);
|
||||
} else {
|
||||
toast("请输入QQ或邮箱");
|
||||
// toast("请输入QQ或邮箱");
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,13 +9,13 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gh.common.util.LoginUtils;
|
||||
import com.lightgame.adapter.BaseRecyclerAdapter;
|
||||
import com.lightgame.utils.Utils;
|
||||
import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.adapter.viewholder.AreaViewHolder;
|
||||
import com.gh.gamecenter.entity.LocalEntity;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lightgame.adapter.BaseRecyclerAdapter;
|
||||
import com.lightgame.utils.Utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@ -105,11 +105,11 @@ public class AreaAdapter extends BaseRecyclerAdapter {
|
||||
|
||||
if (localEntity != null) {
|
||||
List<String> city = localEntity.getCity();
|
||||
if (city != null && city.size() > 0 ) {
|
||||
if (city != null && city.size() > 0) {
|
||||
viewHolder.areaMore.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
viewHolder.areaMore.setVisibility(View.GONE);
|
||||
if (mCurArea.contains(localEntity.getName())) {
|
||||
if (!TextUtils.isEmpty(mCurArea) && mCurArea.contains(localEntity.getName())) {
|
||||
viewHolder.areaSelect.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
viewHolder.areaSelect.setVisibility(View.GONE);
|
||||
@ -119,6 +119,11 @@ public class AreaAdapter extends BaseRecyclerAdapter {
|
||||
} else {
|
||||
viewHolder.areaMore.setVisibility(View.GONE);
|
||||
viewHolder.areaName.setText(mProList.get(position));
|
||||
if (!TextUtils.isEmpty(mCurArea) && mCurArea.contains(mProList.get(position))) {
|
||||
viewHolder.areaSelect.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
viewHolder.areaSelect.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -4,14 +4,17 @@ import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gh.base.BaseRecyclerViewHolder;
|
||||
import com.gh.gamecenter.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
||||
public class GameDetailGameTagTypeViewHolder extends BaseRecyclerViewHolder {
|
||||
|
||||
@BindView(R.id.gamedetail_tag_content)
|
||||
public TextView type;
|
||||
|
||||
public GameDetailGameTagTypeViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
type = (TextView) itemView;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,14 +1,11 @@
|
||||
package com.gh.gamecenter.gamedetail;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gh.common.util.DisplayUtils;
|
||||
import com.gh.gamecenter.R;
|
||||
import com.lightgame.adapter.BaseRecyclerAdapter;
|
||||
import com.gh.gamecenter.adapter.viewholder.GameDetailGameTagTypeViewHolder;
|
||||
import com.lightgame.adapter.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -26,14 +23,7 @@ public class GameDetailGameTagAdapter extends BaseRecyclerAdapter<GameDetailGame
|
||||
|
||||
@Override
|
||||
public GameDetailGameTagTypeViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
|
||||
TextView textView = new TextView(mContext);
|
||||
textView.setTextColor(Color.WHITE);
|
||||
int padd = DisplayUtils.dip2px(mContext, 5);
|
||||
textView.setPadding(DisplayUtils.dip2px(mContext, 8), padd, DisplayUtils.dip2px(mContext, 8), padd);
|
||||
textView.setBackgroundResource(R.drawable.gamedetail_gametag_bg);
|
||||
|
||||
return new GameDetailGameTagTypeViewHolder(textView);
|
||||
return new GameDetailGameTagTypeViewHolder(mLayoutInflater.inflate(R.layout.gamedetail_item_tag, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -339,10 +339,8 @@ public class GameDetailKaiFuAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
} else {
|
||||
if (day < curDay && !isNextMonth) {
|
||||
viewHolder.itemView.setBackgroundColor(Color.parseColor("#30000000"));
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_cancel_dn);
|
||||
} else {
|
||||
viewHolder.itemView.setBackgroundDrawable(new ColorDrawable(0));
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_blue_style);
|
||||
}
|
||||
viewHolder.calendarDay.setText(String.valueOf(day));
|
||||
viewHolder.calendarDay.setTextColor(ContextCompat.getColor(mContext, R.color.text_3a3a3a));
|
||||
@ -360,23 +358,30 @@ public class GameDetailKaiFuAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
allType += kaiFuServerEntity.getType();
|
||||
}
|
||||
|
||||
if (allType.contains("公测")) {
|
||||
type = "公测";
|
||||
if (allType.contains("删档内测")) {
|
||||
type = "删测";
|
||||
} else if (allType.contains("不删档内测")) {
|
||||
type = "内测";
|
||||
} else if (allType.contains("删档内测")) {
|
||||
type = "删测";
|
||||
} else if (allType.contains("公测")) {
|
||||
type = "公测";
|
||||
}
|
||||
if (!TextUtils.isEmpty(type)) {
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_cancel_dn);
|
||||
|
||||
if (day < curDay && !isNextMonth) {
|
||||
if (TextUtils.isEmpty(type)) type = "新服";
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_b3b3b3_bg);
|
||||
viewHolder.calendarKaifu.setText(type);
|
||||
} else {
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_orange_style);
|
||||
if (entity.getServer().size() == 1) {
|
||||
viewHolder.calendarKaifu.setText("新服");
|
||||
if (!TextUtils.isEmpty(type)) {
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_cancel_dn);
|
||||
viewHolder.calendarKaifu.setText(type);
|
||||
} else {
|
||||
viewHolder.calendarKaifu.setText(StringUtils.buildString("新服×"
|
||||
, String.valueOf(entity.getServer().size())));
|
||||
viewHolder.calendarKaifu.setBackgroundResource(R.drawable.textview_orange_style);
|
||||
if (entity.getServer().size() == 1) {
|
||||
viewHolder.calendarKaifu.setText("新服");
|
||||
} else {
|
||||
viewHolder.calendarKaifu.setText(StringUtils.buildString("新服×"
|
||||
, String.valueOf(entity.getServer().size())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -300,7 +300,7 @@ public class Libao1Fragment extends BaseFragment implements SwipeRefreshLayout.O
|
||||
mRecyclerView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
// 资讯Fragment界面切换事件
|
||||
// Fragment界面切换事件
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMainThread(EBUISwitch busNine) {
|
||||
if (LibaoActivity.EB_LIBAOACTIVITY_TAG.equals(busNine.getFrom())) {
|
||||
|
||||
@ -160,6 +160,7 @@ public class PersonalFragment extends BaseFragment implements GetLoginDataUtils.
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMainThread(EBReuse reuse) {
|
||||
if (reuse.getType().equals(LOGIN_TAG)) { // 登入
|
||||
toast("登录成功");
|
||||
mUserInfoEntity = LoginUtils.getUserInfo(getContext());
|
||||
changeLoginState(true);
|
||||
checkMessageUnread(getContext()); // 检查是否有未读消息
|
||||
|
||||
@ -102,7 +102,6 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler,
|
||||
@Override
|
||||
public void onComplete(JSONObject content) {
|
||||
GetLoginDataUtils.getInstance(this).WCLofinCallBack(content);
|
||||
Utils.toast(this, "登录成功");
|
||||
finishActivity();
|
||||
}
|
||||
|
||||
|
||||
9
app/src/main/res/drawable-hdpi/textview_b3b3b3_bg.xml
Normal file
9
app/src/main/res/drawable-hdpi/textview_b3b3b3_bg.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||
android:shape = "rectangle" >
|
||||
|
||||
<solid android:color = "@color/hint" />
|
||||
|
||||
<corners android:radius = "2dp" />
|
||||
|
||||
</shape >
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 773 B |
@ -13,7 +13,9 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id = "@+id/libaodetail_rv_show"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent" />
|
||||
android:layout_height = "match_parent"
|
||||
android:layout_above = "@+id/detail_ll_bottom"
|
||||
android:layout_marginBottom = "-7dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id = "@+id/detail_ll_bottom"
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "60dp"
|
||||
android:layout_centerHorizontal = "true"
|
||||
android:layout_marginTop = "30dp"
|
||||
android:layout_marginTop = "60dp"
|
||||
fresco:placeholderImage = "@drawable/user_default_icon_comment"
|
||||
fresco:roundAsCircle = "true" />
|
||||
|
||||
@ -57,8 +57,8 @@
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:background = "@android:color/white"
|
||||
android:paddingBottom = "15dp"
|
||||
android:paddingTop = "55dp" >
|
||||
android:paddingBottom = "18dp"
|
||||
android:paddingTop = "28dp" >
|
||||
|
||||
<LinearLayout
|
||||
android:id = "@+id/personal_login_qq"
|
||||
@ -75,8 +75,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/login_qq_icon"
|
||||
android:layout_width = "24dp"
|
||||
android:layout_height = "24dp"
|
||||
android:layout_width = "22dp"
|
||||
android:layout_height = "22dp"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:layout_centerHorizontal = "true"
|
||||
android:src = "@drawable/qq_login_icon" />
|
||||
@ -107,8 +107,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/login_wechat_icon"
|
||||
android:layout_width = "24dp"
|
||||
android:layout_height = "24dp"
|
||||
android:layout_width = "22dp"
|
||||
android:layout_height = "22dp"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:layout_centerInParent = "true"
|
||||
android:src = "@drawable/wechat_login_icon" />
|
||||
@ -148,8 +148,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/login_weibo_icon"
|
||||
android:layout_width = "24dp"
|
||||
android:layout_height = "24dp"
|
||||
android:layout_width = "22dp"
|
||||
android:layout_height = "22dp"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:layout_centerInParent = "true"
|
||||
android:src = "@drawable/weibo_login_icon" />
|
||||
@ -188,8 +188,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/personal_game_icon"
|
||||
android:layout_width = "20dp"
|
||||
android:layout_height = "20dp"
|
||||
android:layout_width = "18dp"
|
||||
android:layout_height = "18dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:src = "@drawable/personal_game_icon" />
|
||||
@ -227,8 +227,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/personal_libao_icon"
|
||||
android:layout_width = "20dp"
|
||||
android:layout_height = "20dp"
|
||||
android:layout_width = "18dp"
|
||||
android:layout_height = "18dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:src = "@drawable/personal_libao_icon" />
|
||||
@ -258,8 +258,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/personal_share_icon"
|
||||
android:layout_width = "20dp"
|
||||
android:layout_height = "20dp"
|
||||
android:layout_width = "18dp"
|
||||
android:layout_height = "18dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:src = "@drawable/personal_share_icon" />
|
||||
@ -288,8 +288,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/personal_suggestion_icon"
|
||||
android:layout_width = "20dp"
|
||||
android:layout_height = "20dp"
|
||||
android:layout_width = "18dp"
|
||||
android:layout_height = "18dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:src = "@drawable/personal_suggestion_icon" />
|
||||
@ -318,8 +318,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/personal_setting_icon"
|
||||
android:layout_width = "20dp"
|
||||
android:layout_height = "20dp"
|
||||
android:layout_width = "18dp"
|
||||
android:layout_height = "18dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:src = "@drawable/personal_setting_icon" />
|
||||
|
||||
18
app/src/main/res/layout/gamedetail_item_tag.xml
Normal file
18
app/src/main/res/layout/gamedetail_item_tag.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:paddingRight = "6dp" >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_tag_content"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "24dp"
|
||||
android:background = "@drawable/gamedetail_gametag_bg"
|
||||
android:gravity = "center"
|
||||
android:paddingLeft = "12dp"
|
||||
android:paddingRight = "12dp"
|
||||
android:textColor = "@android:color/white"
|
||||
android:textSize = "12sp" />
|
||||
|
||||
</RelativeLayout >
|
||||
@ -19,6 +19,7 @@
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:textColor = "@color/btn_plugin"
|
||||
android:textSize = "13sp" />
|
||||
android:textSize = "13sp"
|
||||
android:layout_marginBottom="0.5dp" />
|
||||
|
||||
</LinearLayout >
|
||||
Reference in New Issue
Block a user