2.3
立绘图片更新地址 舰娘数据改为国内地址 S图片改为居中 地图攻略功能完成 战斗日志功能完成 更新第三方库
This commit is contained in:
parent
30e527d6f2
commit
458206ae23
Binary file not shown.
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<compositeConfiguration>
|
||||
<compositeBuild compositeDefinitionSource="SCRIPT" />
|
||||
</compositeConfiguration>
|
||||
<option name="delegatedBuild" value="false" />
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
@ -13,6 +13,7 @@
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/RefreshRecyclerView" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/harmony" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
|
@ -5,27 +5,41 @@
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="5">
|
||||
<list size="12">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
|
||||
<item index="6" class="java.lang.String" itemvalue="android.annotation.Nullable" />
|
||||
<item index="7" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
||||
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
|
||||
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
|
||||
<item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
|
||||
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="4">
|
||||
<list size="11">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
|
||||
<item index="5" class="java.lang.String" itemvalue="android.annotation.NonNull" />
|
||||
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
||||
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
|
||||
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
|
||||
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
|
||||
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -2,11 +2,10 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/RefreshRecyclerView/RefreshRecyclerView.iml" filepath="$PROJECT_DIR$/RefreshRecyclerView/RefreshRecyclerView.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/harmony/harmony.iml" filepath="$PROJECT_DIR$/harmony/harmony.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/jianrmg_v2.iml" filepath="$PROJECT_DIR$/jianrmg_v2.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/mylibrary/mylibrary.iml" filepath="$PROJECT_DIR$/mylibrary/mylibrary.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/RefreshRecyclerView/RefreshRecyclerView.iml" filepath="$PROJECT_DIR$/RefreshRecyclerView/RefreshRecyclerView.iml" group="jianrmg_v2/RefreshRecyclerView" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" group="jianrmg_v2/app" />
|
||||
<module fileurl="file://$PROJECT_DIR$/harmony/harmony.iml" filepath="$PROJECT_DIR$/harmony/harmony.iml" group="jianrmg_v2/harmony" />
|
||||
<module fileurl="file://$PROJECT_DIR$/jianrmg_v2.iml" filepath="$PROJECT_DIR$/jianrmg_v2.iml" group="jianrmg_v2" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,12 +1,12 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '28.0.3'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 25
|
||||
targetSdkVersion 29
|
||||
versionCode 6
|
||||
versionName "1.3.0"
|
||||
}
|
||||
|
@ -63,10 +63,10 @@ dependencies {
|
||||
|
||||
|
||||
//okhttp
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
|
||||
//FastJson
|
||||
implementation 'com.alibaba:fastjson:1.2.41'
|
||||
implementation 'com.alibaba:fastjson:1.2.68'
|
||||
|
||||
//轮播图
|
||||
implementation 'com.bigkoo:convenientbanner:2.0.5'
|
||||
@ -78,8 +78,8 @@ dependencies {
|
||||
implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'
|
||||
|
||||
//滑动Tabs
|
||||
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
|
||||
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar'
|
||||
implementation 'com.ogaclejapan.smarttablayout:library:2.0.0@aar'
|
||||
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.7.0@aar'
|
||||
|
||||
//MD 对话框
|
||||
implementation 'me.drakeet.materialdialog:library:1.3.1'
|
||||
@ -121,11 +121,11 @@ dependencies {
|
||||
implementation 'com.github.arcadefire:nice-spinner:1.3.4'
|
||||
|
||||
//glide
|
||||
implementation 'com.github.bumptech.glide:glide:4.10.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
|
||||
//友盟
|
||||
implementation 'com.umeng.umsdk:analytics:8.1.3'
|
||||
implementation 'com.umeng.umsdk:analytics:8.1.6'
|
||||
implementation 'com.umeng.umsdk:common:2.0.0'
|
||||
|
||||
//友盟推动
|
||||
@ -140,10 +140,10 @@ dependencies {
|
||||
api project(path: ':UserModel')*/
|
||||
|
||||
//七牛云
|
||||
implementation 'com.qiniu:qiniu-android-sdk:7.3.15'
|
||||
implementation 'com.qiniu:qiniu-android-sdk:7.5.2'
|
||||
|
||||
//zip4j
|
||||
implementation 'net.lingala.zip4j:zip4j:1.3.3'
|
||||
implementation 'net.lingala.zip4j:zip4j:2.5.1'
|
||||
|
||||
//卡顿检测
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
android:roundIcon="@mipmap/icon_logo_round"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:fullBackupContent="@xml/backup_descriptor"
|
||||
@ -95,6 +96,7 @@
|
||||
<activity android:name=".views.UserDataActivity" />
|
||||
<activity android:name=".views.MapTopActivity" />
|
||||
<activity android:name=".views.MapUserTeamActivity" />
|
||||
<activity android:name=".views.MapStrategyActivity" />
|
||||
|
||||
|
||||
<provider
|
||||
|
@ -6,6 +6,7 @@ import android.graphics.Color;
|
||||
import android.graphics.drawable.ClipDrawable;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Environment;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -13,14 +14,17 @@ import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.nostra13.universalimageloader.core.assist.FailReason;
|
||||
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
|
||||
import com.yutou.jianr_mg.Data.ShipEquipmnt;
|
||||
import com.yutou.jianr_mg.Data.TeamData;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.util.List;
|
||||
@ -37,7 +41,13 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
this.context = context;
|
||||
loader = Utils.initImageLoader(context);
|
||||
}
|
||||
|
||||
boolean isNotHP=false;
|
||||
public MagicTeamDataAdapter(List<TeamData> list, Context context,boolean isNotHP) {
|
||||
this.list = list;
|
||||
this.context = context;
|
||||
loader = Utils.initImageLoader(context);
|
||||
this.isNotHP=isNotHP;
|
||||
}
|
||||
public void setSpoiler(boolean spoiler) {
|
||||
// this.spoiler = spoiler;
|
||||
}
|
||||
@ -111,6 +121,9 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
if (!spoiler) {
|
||||
// item.hpBar.setProgress(0);
|
||||
}
|
||||
if(isNotHP){
|
||||
item.hpBar.setVisibility(View.GONE);
|
||||
}
|
||||
item.title.setText(data.getTitle());
|
||||
item.title.setVisibility(View.VISIBLE);
|
||||
item.hp.setVisibility(View.VISIBLE);
|
||||
@ -139,6 +152,7 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
if (data.getItem1Url() != null) {
|
||||
loader.displayImage(data.getItem1Url(), item.item1, new imageListener());
|
||||
item.item1.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||
item.item1.setOnClickListener(new EquipmentClick(data.getEquipments().get(0)));
|
||||
item.item1.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
item.item1.setVisibility(View.GONE);
|
||||
@ -146,6 +160,7 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
if (data.getItem2Url() != null) {
|
||||
loader.displayImage(data.getItem2Url(), item.item2, new imageListener());
|
||||
item.item2.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||
item.item2.setOnClickListener(new EquipmentClick(data.getEquipments().get(1)));
|
||||
item.item2.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
item.item2.setVisibility(View.GONE);
|
||||
@ -153,6 +168,7 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
if (data.getItem3Url() != null) {
|
||||
loader.displayImage(data.getItem3Url(), item.item3, new imageListener());
|
||||
item.item3.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||
item.item3.setOnClickListener(new EquipmentClick(data.getEquipments().get(2)));
|
||||
item.item3.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
item.item3.setVisibility(View.GONE);
|
||||
@ -160,6 +176,7 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
if (data.getItem4Url() != null) {
|
||||
loader.displayImage(data.getItem4Url(), item.item4, new imageListener());
|
||||
item.item4.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||
item.item4.setOnClickListener(new EquipmentClick(data.getEquipments().get(3)));
|
||||
item.item4.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
item.item4.setVisibility(View.GONE);
|
||||
@ -201,7 +218,7 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
class imageListener implements ImageLoadingListener {
|
||||
private static class imageListener implements ImageLoadingListener {
|
||||
@Override
|
||||
public void onLoadingStarted(String imageUri, View view) {
|
||||
|
||||
@ -222,4 +239,63 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
|
||||
}
|
||||
}
|
||||
private class EquipmentClick implements View.OnClickListener{
|
||||
private PopupWindow popupWindow;
|
||||
public EquipmentClick(String index){
|
||||
ShipEquipmnt equipmnt= JianRUtils.getEquipmnt(Integer.parseInt(index),-1);
|
||||
TextView textView=new TextView(context);
|
||||
int i=1;
|
||||
if(equipmnt!=null) {
|
||||
StringBuilder msg=new StringBuilder();
|
||||
msg.append(equipmnt.getTitle()).append("\n");
|
||||
msg.append("稀有度:").append(equipmnt.getStar()).append("\n");
|
||||
|
||||
if(equipmnt.getAtk()!=0){
|
||||
msg.append("攻击+").append(equipmnt.getAtk()).append("\n");
|
||||
}
|
||||
if(!equipmnt.getDef().equals("0")){
|
||||
msg.append("防御+").append(equipmnt.getDef()).append("\n");
|
||||
}
|
||||
if(!equipmnt.getTorpedo().equals("0")){
|
||||
msg.append("鱼雷+").append(equipmnt.getTorpedo()).append("\n");
|
||||
}
|
||||
if(!equipmnt.getAntisub().equals("0")){
|
||||
msg.append("反潜+").append(equipmnt.getAntisub()).append("\n");
|
||||
}
|
||||
if(!equipmnt.getRadar().equals("0")){
|
||||
msg.append("索敌+").append(equipmnt.getRadar()).append("\n");
|
||||
}
|
||||
if (!equipmnt.getHit().equals("0")){
|
||||
msg.append("命中+").append(equipmnt.getHit()).append("\n");
|
||||
}
|
||||
if(equipmnt.getRange()!=0){
|
||||
msg.append("范围+").append(equipmnt.getRange()).append("\n");
|
||||
}
|
||||
if (!equipmnt.getMiss().equals("0")){
|
||||
msg.append("回避+").append(equipmnt.getMiss()).append("\n");
|
||||
}
|
||||
if(!equipmnt.getLuck().equals("0")){
|
||||
msg.append("幸运+").append(equipmnt.getLuck()).append("\n");
|
||||
}
|
||||
msg.append(equipmnt.getDesc());
|
||||
i=msg.toString().split("\n").length;
|
||||
textView.setText(msg.toString());
|
||||
// System.out.println(equipmnt.toString());
|
||||
}else{
|
||||
textView.setText("Not Equipmnt Info");
|
||||
}
|
||||
textView.setTextColor(Color.BLACK);
|
||||
textView.setBackgroundColor(Color.WHITE);
|
||||
popupWindow=new PopupWindow(textView,300,i*100);
|
||||
popupWindow.setOutsideTouchable(false);
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(popupWindow.isShowing()){
|
||||
popupWindow.dismiss();
|
||||
}else {
|
||||
popupWindow.showAsDropDown(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,107 +0,0 @@
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianr_mg.Data.JianNiang;
|
||||
import com.yutou.jianr_mg.Data.ShipEquipmnt;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
||||
import cn.lemon.view.adapter.RecyclerAdapter;
|
||||
|
||||
public class MapUserTeamRecyclierAdapter extends RecyclerAdapter<JSONObject> {
|
||||
ImageLoader loader;
|
||||
|
||||
public MapUserTeamRecyclierAdapter(Context context) {
|
||||
super(context);
|
||||
loader = Utils.initImageLoader(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseViewHolder<JSONObject> onCreateBaseViewHolder(ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(parent, R.layout.item_team);
|
||||
}
|
||||
|
||||
private class ViewHolder extends BaseViewHolder<JSONObject> {
|
||||
TextView title, hp, hpMax;
|
||||
ImageView icon, icon_, item1, item2, item3, item4;
|
||||
ProgressBar hpBar;
|
||||
LinearLayout hpLayout;
|
||||
|
||||
public ViewHolder(ViewGroup parent, int layoutId) {
|
||||
super(parent, layoutId);
|
||||
hp = findViewById(R.id.hp);
|
||||
hpMax = findViewById(R.id.hpMax);
|
||||
hpBar = findViewById(R.id.itemHp);
|
||||
title = findViewById(R.id.title);
|
||||
icon = findViewById(R.id.icon);
|
||||
icon_ = findViewById(R.id.icon_);
|
||||
item1 = findViewById(R.id.item1);
|
||||
item2 = findViewById(R.id.item2);
|
||||
item3 = findViewById(R.id.item3);
|
||||
item4 = findViewById(R.id.item4);
|
||||
hpLayout = findViewById(R.id.hpLayout);
|
||||
hpBar.setVisibility(View.GONE);
|
||||
hpLayout.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void setData(JSONObject data) {
|
||||
super.setData(data);
|
||||
JianNiang jianNiang = JianRUtils.getJianNiangByCId(data.getInteger("cid"));
|
||||
if (jianNiang == null)
|
||||
return;
|
||||
title.setText(jianNiang.getTitle() + " Level:" + data.getInteger("level"));
|
||||
loader.displayImage(JianRUtils.getShipImageByCid(data.getInteger("cid"), true), icon);
|
||||
JSONArray equipment = data.getJSONArray("equipment");
|
||||
if (equipment.getString(0) != null) {
|
||||
loader.displayImage(JianRUtils.getShipImageByCid(Integer.parseInt(equipment.getString(0)), false), item1);
|
||||
item1.setOnClickListener(view -> {
|
||||
ShipEquipmnt shipEquipmnt = JianRUtils.getEquipmnt(Integer.parseInt(equipment.getString(0)), -2);
|
||||
if (shipEquipmnt != null)
|
||||
Utils.toast(getContext(), shipEquipmnt.getTitle());
|
||||
});
|
||||
}
|
||||
if (equipment.getString(1) != null) {
|
||||
loader.displayImage(JianRUtils.getShipImageByCid(Integer.parseInt(equipment.getString(1)), false), item2);
|
||||
item2.setOnClickListener(view -> {
|
||||
ShipEquipmnt shipEquipmnt = JianRUtils.getEquipmnt(Integer.parseInt(equipment.getString(1)), -2);
|
||||
if (shipEquipmnt != null)
|
||||
Utils.toast(getContext(), shipEquipmnt.getTitle());
|
||||
});
|
||||
}
|
||||
if (equipment.getString(2) != null) {
|
||||
loader.displayImage(JianRUtils.getShipImageByCid(Integer.parseInt(equipment.getString(2)), false), item3);
|
||||
item3.setOnClickListener(view -> {
|
||||
ShipEquipmnt shipEquipmnt = JianRUtils.getEquipmnt(Integer.parseInt(equipment.getString(2)), -2);
|
||||
if (shipEquipmnt != null)
|
||||
Utils.toast(getContext(), shipEquipmnt.getTitle());
|
||||
});
|
||||
}
|
||||
if (equipment.getString(3) != null) {
|
||||
loader.displayImage(JianRUtils.getShipImageByCid(Integer.parseInt(equipment.getString(3)), false), item4);
|
||||
item4.setOnClickListener(view -> {
|
||||
ShipEquipmnt shipEquipmnt = JianRUtils.getEquipmnt(Integer.parseInt(equipment.getString(3)), -2);
|
||||
if (shipEquipmnt != null)
|
||||
Utils.toast(getContext(), shipEquipmnt.getTitle());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -339,6 +339,49 @@ public class ShipEquipmnt {
|
||||
this.shipType = shipType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ShipEquipmnt{" +
|
||||
"cid=" + cid +
|
||||
", star=" + star +
|
||||
", title='" + title + '\'' +
|
||||
", country='" + country + '\'' +
|
||||
", type=" + type +
|
||||
", hp='" + hp + '\'' +
|
||||
", atk=" + atk +
|
||||
", def='" + def + '\'' +
|
||||
", torpedo='" + torpedo + '\'' +
|
||||
", antisub='" + antisub + '\'' +
|
||||
", radar='" + radar + '\'' +
|
||||
", hit='" + hit + '\'' +
|
||||
", range=" + range +
|
||||
", miss='" + miss + '\'' +
|
||||
", luck='" + luck + '\'' +
|
||||
", correction='" + correction + '\'' +
|
||||
", effect='" + effect + '\'' +
|
||||
", dismantle=" + dismantle +
|
||||
", author='" + author + '\'' +
|
||||
", desc='" + desc + '\'' +
|
||||
", desc2='" + desc2 + '\'' +
|
||||
", equipIndex='" + equipIndex + '\'' +
|
||||
", picId=" + picId +
|
||||
", boreType=" + boreType +
|
||||
", handbookType='" + handbookType + '\'' +
|
||||
", aircraftAtk='" + aircraftAtk + '\'' +
|
||||
", missileTmd='" + missileTmd + '\'' +
|
||||
", missileHit='" + missileHit + '\'' +
|
||||
", airDef='" + airDef + '\'' +
|
||||
", airDefRate=" + airDefRate +
|
||||
", airDefCorrect='" + airDefCorrect + '\'' +
|
||||
", missleDefModulus='" + missleDefModulus + '\'' +
|
||||
", shipCid='" + shipCid + '\'' +
|
||||
", shipCountry='" + shipCountry + '\'' +
|
||||
", specialEffect='" + specialEffect + '\'' +
|
||||
", aluminiumUse='" + aluminiumUse + '\'' +
|
||||
", shipType=" + shipType +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class DismantleBean {
|
||||
/**
|
||||
* 2 : 0
|
||||
|
@ -160,7 +160,7 @@ public class DropFragment extends Fragment {
|
||||
Map<String, String> map = new ArrayMap<>();
|
||||
String cid = json.get("cid").toString();
|
||||
String title = json.getString("title");
|
||||
map.put("icon", "http://jianr.jianrmod.cn/jianr/ship/S_NORMAL_" + JianRUtils.jianCidToid(cid) + ".png");
|
||||
map.put("icon", "http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/ships/S/NORMAL/S_NORMAL_" + JianRUtils.jianCidToid(cid) + ".png");
|
||||
map.put("name", title);
|
||||
/* map.put("time", new SimpleDateFormat("yyyy年MM月dd HH:mm:ss")
|
||||
.format(new Date(Long.valueOf(json.getJSONObject("data").getString("createTime")))));*/
|
||||
|
@ -6,20 +6,27 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianr_mg.Fragments.GameDataFragments.WarLogFragments.WarData;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DaytimeListViewAdapter extends BaseAdapter {
|
||||
private Context context;
|
||||
private List<WarData> list;
|
||||
private ImageLoader imageLoader;
|
||||
|
||||
public DaytimeListViewAdapter(Context context, List<WarData> list) {
|
||||
this.context = context;
|
||||
this.list = list;
|
||||
imageLoader= Utils.initImageLoader(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -44,6 +51,8 @@ public class DaytimeListViewAdapter extends BaseAdapter {
|
||||
if (view == null) {
|
||||
view = LayoutInflater.from(context).inflate(R.layout.item_war, null);
|
||||
holder = new ViewHolder();
|
||||
holder.userIcon=view.findViewById(R.id.userIcon);
|
||||
holder.enemyIcon=view.findViewById(R.id.enemyIcon);
|
||||
holder.user = view.findViewById(R.id.user);
|
||||
holder.arrow = view.findViewById(R.id.arrow);
|
||||
holder.enemy = view.findViewById(R.id.enemy);
|
||||
@ -56,7 +65,12 @@ public class DaytimeListViewAdapter extends BaseAdapter {
|
||||
holder.user.setText("");
|
||||
holder.arrow.setText("----进入夜战----");
|
||||
holder.enemy.setText("");
|
||||
holder.userIcon.setVisibility(View.GONE);
|
||||
holder.enemyIcon.setVisibility(View.GONE);
|
||||
}else {
|
||||
holder.userIcon.setVisibility(View.VISIBLE);
|
||||
holder.enemyIcon.setVisibility(View.VISIBLE);
|
||||
|
||||
holder.user.setText(warData.getUserName());
|
||||
holder.arrow.setText("--" + warData.getAttackModel() + "-->");
|
||||
String[] enemyName = warData.getEnemy();
|
||||
@ -66,7 +80,13 @@ public class DaytimeListViewAdapter extends BaseAdapter {
|
||||
}
|
||||
name=name.substring(0,name.length()-1);
|
||||
holder.enemy.setText(name);
|
||||
if(JianRUtils.jianCidToid(warData.getCid()+"")==0){
|
||||
imageLoader.displayImage(JianRUtils.getEnemyShipImageByCid(warData.getCid()),holder.userIcon);
|
||||
}else
|
||||
imageLoader.displayImage(JianRUtils.getShipImageByCid(warData.getCid(),true),holder.userIcon);
|
||||
imageLoader.displayImage(JianRUtils.getEnemyShipImageByCid(Long.parseLong(warData.getEnemyCid()[0])),holder.enemyIcon);
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@ -82,6 +102,7 @@ public class DaytimeListViewAdapter extends BaseAdapter {
|
||||
}
|
||||
|
||||
private class ViewHolder {
|
||||
ImageView userIcon,enemyIcon;
|
||||
TextView user, arrow, enemy;
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.yutou.jianr_mg.Fragments.GameDataFragments.WarLogFragments;
|
||||
import com.umeng.commonsdk.debug.W;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -22,6 +23,7 @@ public class WarData {
|
||||
private long cid;
|
||||
private int fromIndex;
|
||||
private String[] enemy;
|
||||
private String[] enemyCid;
|
||||
private int[] damage;
|
||||
private boolean userAttack;
|
||||
private int attackModel;
|
||||
@ -114,6 +116,14 @@ public class WarData {
|
||||
this.enemy = enemy;
|
||||
}
|
||||
|
||||
public String[] getEnemyCid() {
|
||||
return enemyCid;
|
||||
}
|
||||
|
||||
public void setEnemyCid(String[] enemyCid) {
|
||||
this.enemyCid = enemyCid;
|
||||
}
|
||||
|
||||
public int[] getDamage() {
|
||||
return damage;
|
||||
}
|
||||
@ -136,11 +146,14 @@ public class WarData {
|
||||
}
|
||||
warData.setDamage(damages);
|
||||
String[] enemyNames = new String[json.getJSONArray("targetIndex").length()];
|
||||
String[] enemyCids = new String[json.getJSONArray("targetIndex").length()];
|
||||
array = !warData.isUserAttack() ? warReport.getJSONArray("selfShips") : warReport.getJSONArray("enemyShips");
|
||||
for (int i = 0; i < json.getJSONArray("targetIndex").length(); i++) {
|
||||
enemyNames[i] = array.getJSONObject(json.getJSONArray("targetIndex").getInt(i)).getString("title");
|
||||
enemyCids[i] = array.getJSONObject(json.getJSONArray("targetIndex").getInt(i)).getString("shipCid");
|
||||
}
|
||||
warData.setEnemy(enemyNames);
|
||||
warData.setEnemyCid(enemyCids);
|
||||
warData.setAttackModel(attackModel);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -93,9 +93,7 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
initViews();
|
||||
initData();
|
||||
initAd();
|
||||
/*JianRUtils.reloadShipType();
|
||||
MapView mapView=new MapView(this);
|
||||
setContentView(mapView.getView());*/
|
||||
JianRUtils.reloadShipType();
|
||||
}
|
||||
|
||||
private void login(String name, String pass) {
|
||||
|
@ -35,18 +35,18 @@ public class JianRUtils {
|
||||
|
||||
public static int jianCidToid(String cid) {
|
||||
if (cid.substring(1, 2).equals("1")) {
|
||||
int con = Integer.valueOf(cid.substring(2, cid.length() - 2));
|
||||
int con = Integer.parseInt(cid.substring(2, cid.length() - 2));
|
||||
return 1000 + con;
|
||||
} else {
|
||||
return Integer.valueOf(cid.substring(2, cid.length() - 2));
|
||||
return Integer.parseInt(cid.substring(2, cid.length() - 2));
|
||||
}
|
||||
}
|
||||
|
||||
public static int equipCidToid(String cid) {
|
||||
return Integer.valueOf(cid.substring(2)) / 100;
|
||||
return Integer.parseInt(cid.substring(2)) / 100;
|
||||
}
|
||||
|
||||
public static int EnemyShipCardId(String cid) {
|
||||
public static int enemyShipCardId(String cid) {
|
||||
try {
|
||||
for (int i = 0; i < shipCardId.length(); i++) {
|
||||
JSONObject json = shipCardId.getJSONObject(i);
|
||||
@ -96,7 +96,7 @@ public class JianRUtils {
|
||||
team.setTitle(js.getString("title"));
|
||||
team.setJid(js.getInt("id"));
|
||||
team.setHp(warRepoot.getJSONArray("hpBeforeNightWarSelf").get(i).toString());
|
||||
team.setImageUrl("http://jianr.jianrmod.cn/jianr/ship/S_NORMAL_" + JianRUtils.jianCidToid(js.get("shipCid").toString()) + ".png");
|
||||
team.setImageUrl("http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/ships/S/NORMAL/S_NORMAL_" + JianRUtils.jianCidToid(js.get("shipCid").toString()) + ".png");
|
||||
team.setType(js.getInt("type"));
|
||||
JSONArray array = js.getJSONArray("equipment");
|
||||
List<String> list = new ArrayList<>();
|
||||
@ -105,10 +105,10 @@ public class JianRUtils {
|
||||
}
|
||||
team.setEquipments(list);
|
||||
try {
|
||||
team.setItem1Url("http://jianr.jianrmod.cn/jianr/equipment/equip_L_" + JianRUtils.equipCidToid(array.get(0).toString()) + ".png");
|
||||
team.setItem2Url("http://jianr.jianrmod.cn/jianr/equipment/equip_L_" + JianRUtils.equipCidToid(array.get(1).toString()) + ".png");
|
||||
team.setItem3Url("http://jianr.jianrmod.cn/jianr/equipment/equip_L_" + JianRUtils.equipCidToid(array.get(2).toString()) + ".png");
|
||||
team.setItem4Url("http://jianr.jianrmod.cn/jianr/equipment/equip_L_" + JianRUtils.equipCidToid(array.get(3).toString()) + ".png");
|
||||
team.setItem1Url("http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/equipments/equip_L_" + JianRUtils.equipCidToid(array.get(0).toString()) + ".png");
|
||||
team.setItem2Url("http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/equipments/equip_L_" + JianRUtils.equipCidToid(array.get(1).toString()) + ".png");
|
||||
team.setItem3Url("http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/equipments/equip_L_" + JianRUtils.equipCidToid(array.get(2).toString()) + ".png");
|
||||
team.setItem4Url("http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/equipments/equip_L_" + JianRUtils.equipCidToid(array.get(3).toString()) + ".png");
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
@ -175,7 +175,7 @@ public class JianRUtils {
|
||||
team.setHpMax(js.get("hpMax").toString());
|
||||
team.setTitle(js.getString("title"));
|
||||
team.setHp(warRepoot.getJSONArray("hpBeforeNightWarEnemy").get(i).toString());
|
||||
team.setImageUrl("http://jianr.jianrmod.cn/jianr/ship/S_NORMAL_" + JianRUtils.EnemyShipCardId(js.get("shipCid").toString()) + ".png");
|
||||
team.setImageUrl("http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/ships/S/NORMAL/S_NORMAL_" + JianRUtils.enemyShipCardId(js.get("shipCid").toString()) + ".png");
|
||||
team.setUser(false);
|
||||
team.setSrc(json);
|
||||
data.add(team);
|
||||
@ -187,13 +187,16 @@ public class JianRUtils {
|
||||
return data;
|
||||
}
|
||||
|
||||
public static String getShipImageByCid(int cid,boolean ship){
|
||||
public static String getShipImageByCid(long cid,boolean ship){
|
||||
if(ship)
|
||||
return "http://jianr.jianrmod.cn/jianr/ship/S_NORMAL_"+jianCidToid(cid+"")+".png";
|
||||
return "http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/ships/S/NORMAL/S_NORMAL_"+jianCidToid(cid+"")+".png";
|
||||
else{
|
||||
return "http://jianr.jianrmod.cn/jianr/equipment/equip_L_"+equipCidToid(cid+"")+".png";
|
||||
return "http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/equipments/equip_L_"+equipCidToid(cid+"")+".png";
|
||||
}
|
||||
}
|
||||
public static String getEnemyShipImageByCid(long cid){
|
||||
return "http://jianr.jianrmod.cn/jianr/moeassisstant/zjsnr/illustration/ships/S/NORMAL/S_NORMAL_"+enemyShipCardId(cid+"")+".png";
|
||||
}
|
||||
|
||||
private static List<JianNiang> jianNiangs=new ArrayList<>();
|
||||
private static List<ShipEquipmnt> equipmnts=new ArrayList<>();
|
||||
@ -323,7 +326,7 @@ public class JianRUtils {
|
||||
return;
|
||||
}
|
||||
}
|
||||
HttpUtils.downloadFile("http://version.jr.moepoint.tw/index/getInitConfigs", Utils.getAppPath() + "/", new DownloadFileInerface() {
|
||||
HttpUtils.downloadFile("http://version.jr.moefantasy.com/index/getInitConfigs", Utils.getAppPath() + "/", new DownloadFileInerface() {
|
||||
@Override
|
||||
public boolean downloading(String fileName, int current, long length) {
|
||||
return true;
|
||||
|
@ -3,10 +3,11 @@ package com.yutou.jianr_mg.Tools;
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
|
||||
import net.lingala.zip4j.core.ZipFile;
|
||||
import net.lingala.zip4j.ZipFile;
|
||||
import net.lingala.zip4j.exception.ZipException;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -22,7 +23,8 @@ public class ZipUtils {
|
||||
System.out.println("文件:" + zipFile.exists());
|
||||
try {
|
||||
ZipFile _zipFile = new ZipFile(zipFile);
|
||||
_zipFile.setFileNameCharset("GBK"); //设置编码格式(支持中文)
|
||||
//_zipFile.setFileNameCharset("GBK"); //设置编码格式(支持中文)
|
||||
_zipFile.setCharset(Charset.forName("GBK"));
|
||||
if (!_zipFile.isValidZipFile()) { //检查输入的zip文件是否是有效的zip文件
|
||||
throw new ZipException("压缩文件不合法,可能被损坏.");
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MapStrategyActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
MapView mapView=new MapView(this);
|
||||
setContentView(mapView.getView());
|
||||
}
|
||||
}
|
@ -16,6 +16,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.yutou.jianr_mg.Data.GameInfoLog;
|
||||
import com.yutou.jianr_mg.Data.MapNode;
|
||||
import com.yutou.jianr_mg.Data.TeamData;
|
||||
@ -25,6 +26,7 @@ import com.yutou.jianr_mg.Network.HttpApi;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
@ -51,6 +53,7 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
private List<GameInfoLog> logs;
|
||||
private int model = -1;
|
||||
private MapNode mapNode;
|
||||
private KProgressHUD hud;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@ -59,6 +62,7 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
level_name = getIntent().getStringExtra("level_name");
|
||||
chapterName = getIntent().getStringExtra("chapterName");
|
||||
model = getIntent().getIntExtra("data", -1);
|
||||
hud=new KProgressHUD(this);
|
||||
initView();
|
||||
switch (model) {
|
||||
case 0:
|
||||
@ -126,6 +130,7 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
url = HttpApi.MAPTOP_MAP_DATA;
|
||||
json.put("chapterName", chapterName);
|
||||
}
|
||||
hud.show();
|
||||
HttpUtils.post(HttpApi.HOME_URL + url, json, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
@ -147,6 +152,7 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
handler.post(() -> {
|
||||
hud.dismiss();
|
||||
adapter = new ArrayAdapter<>(MapTopActivity.this, android.R.layout.simple_list_item_1, nodes);
|
||||
listView.setAdapter(adapter);
|
||||
});
|
||||
@ -157,7 +163,10 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
|
||||
handler.post(()->{
|
||||
hud.dismiss();
|
||||
Utils.toast(MapTopActivity.this,"加载失败");
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
@ -172,6 +181,7 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("node", mapNode.getId());
|
||||
json.put("limit", limit);
|
||||
hud.show();
|
||||
HttpUtils.post(HttpApi.HOME_URL + HttpApi.MAPTOP_USER_TEAM, json, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
@ -210,11 +220,17 @@ public class MapTopActivity extends AppCompatActivity {
|
||||
e.printStackTrace();
|
||||
System.out.println(string);
|
||||
}
|
||||
handler.post(()->{
|
||||
hud.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
|
||||
handler.post(()->{
|
||||
hud.dismiss();
|
||||
Utils.toast(MapTopActivity.this,"加载失败:"+e.getMessage());
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
|
@ -1,37 +1,33 @@
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ListView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianr_mg.Adapters.MapUserTeamRecyclierAdapter;
|
||||
import com.yutou.jianr_mg.Adapters.MagicTeamDataAdapter;
|
||||
import com.yutou.jianr_mg.Data.GameInfoLog;
|
||||
import com.yutou.jianr_mg.Data.MapNode;
|
||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||
import com.yutou.jianr_mg.Network.HttpApi;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Data.TeamData;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import cn.lemon.view.RefreshRecyclerView;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class MapUserTeamActivity extends AppCompatActivity {
|
||||
private RefreshRecyclerView recyclerView;
|
||||
private MapUserTeamRecyclierAdapter adapter;
|
||||
private GameInfoLog mapNode;
|
||||
private int limit=0;
|
||||
private ListView listView;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_favorite);
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
// setContentView(R.layout.activity_favorite);
|
||||
listView=new ListView(this);
|
||||
setContentView(listView);
|
||||
try {
|
||||
mapNode= JSON.parseObject(getIntent().getStringExtra("data"), GameInfoLog.class);
|
||||
}catch (Exception e){
|
||||
@ -40,17 +36,17 @@ public class MapUserTeamActivity extends AppCompatActivity {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
initView();
|
||||
initData();
|
||||
}
|
||||
|
||||
void initView() {
|
||||
adapter=new MapUserTeamRecyclierAdapter(this);
|
||||
recyclerView.setSwipeRefreshColors(0xFF437845, 0xFFE44F98, 0xFF2FAC21);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setAdapter(adapter);
|
||||
}
|
||||
void initData(){
|
||||
try {
|
||||
JSONObject message=new JSONObject(mapNode.getMessage());
|
||||
List<TeamData> list=JianRUtils.getUserTeam(message);
|
||||
MagicTeamDataAdapter adapter=new MagicTeamDataAdapter(list,this,true);
|
||||
listView.setAdapter(adapter);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import android.widget.LinearLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.yutou.jianr_mg.Adapters.MapRecyclierAdapter;
|
||||
import com.yutou.jianr_mg.Data.MapTop;
|
||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||
@ -34,10 +35,12 @@ public class MapView {
|
||||
private MapRecyclierAdapter adapter;
|
||||
private int limit = 0;
|
||||
private Handler handler;
|
||||
private KProgressHUD hud;
|
||||
|
||||
public MapView(Context context) {
|
||||
this.context = context;
|
||||
handler=new Handler();
|
||||
hud=new KProgressHUD(context);
|
||||
initView();
|
||||
initData(true);
|
||||
}
|
||||
@ -60,7 +63,6 @@ public class MapView {
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
mainLayout.addView(search);
|
||||
mainLayout.addView(recyclerView);
|
||||
|
||||
recyclerView.addRefreshAction(() -> {
|
||||
|
@ -27,6 +27,7 @@
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/icon_logo" />
|
||||
|
||||
<LinearLayout
|
||||
@ -84,6 +85,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/icon_logo" />
|
||||
|
||||
<ImageView
|
||||
@ -91,6 +93,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/icon_logo" />
|
||||
|
||||
<ImageView
|
||||
@ -98,6 +101,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/icon_logo" />
|
||||
|
||||
<ImageView
|
||||
@ -105,6 +109,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/icon_logo" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -1,21 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/userIcon"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/icon_drop" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/enemyIcon"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/icon_home" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/userIcon"
|
||||
app:layout_constraintStart_toStartOf="@+id/userIcon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/userIcon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/arrow"
|
||||
@ -33,11 +53,9 @@
|
||||
android:id="@+id/enemy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/enemyIcon"
|
||||
app:layout_constraintStart_toStartOf="@+id/enemyIcon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/enemyIcon" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user