d
This commit is contained in:
@@ -96,4 +96,5 @@ dependencies {
|
||||
|
||||
// api 'com.airbnb.android:lottie:1.0.1'
|
||||
implementation 'com.airbnb.android:lottie:3.4.0'
|
||||
implementation 'com.github.paradoxie:AutoVerticalTextview:0.1'
|
||||
}
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_MMS" />
|
||||
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||
<!-- 写入扩展存储,向扩展卡写入数据,用于写入离线定位数据 -->
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR" /> <!-- 写入扩展存储,向扩展卡写入数据,用于写入离线定位数据 -->
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" /> <!-- 访问网络,网络定位需要上网 -->
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" /> <!-- 腾讯bugly权限 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <!-- Bugly升级SDK权限配置开始 -->
|
||||
@@ -34,8 +33,6 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 精确定位权限,允许一个程序访问精确位置(GPS定位) -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
|
||||
!--声明SD卡读写权限-->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
@@ -48,14 +45,14 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".main.kehu.activity.FpOrderInfoActivity"></activity>
|
||||
<activity android:name=".main.my.activity.DemoActivity"></activity>
|
||||
<activity android:name=".main.kehu.activity.FpOrderInfoActivity" />
|
||||
<activity android:name=".main.kehu.activity.MoActivity" />
|
||||
<activity android:name=".main.activity.ForgetPasActivity" />
|
||||
<activity android:name=".main.activity.ModifyPasActivity" />
|
||||
<activity android:name=".main.find.ConversationActivity" />
|
||||
<activity android:name=".main.find.CommentActivity" />
|
||||
<activity android:name=".main.kehu.activity.JsonDataActivity">
|
||||
</activity>
|
||||
<activity android:name=".main.kehu.activity.JsonDataActivity"></activity>
|
||||
<activity android:name=".main.kehu.activity.CustomerDetailActivity" />
|
||||
<activity android:name=".main.activity.Main2Activity" /> <!-- 开启页 -->
|
||||
<activity
|
||||
@@ -79,9 +76,7 @@
|
||||
<activity
|
||||
android:name=".main.activity.MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/DefaultCityPickerTheme"
|
||||
>
|
||||
</activity>
|
||||
android:theme="@style/DefaultCityPickerTheme"></activity>
|
||||
<activity android:name=".view.webview.XfiveWebActivity" />
|
||||
<activity
|
||||
android:name=".main.activity.mine.MessageNoticeActivity"
|
||||
@@ -97,22 +92,26 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".main.kehu.activity.DesignActivity"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
android:screenOrientation="portrait"></activity>
|
||||
<activity
|
||||
android:name=".main.my.activity.PersonalProfileActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".main.kehu.activity.AddCustomerActivity"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".main.kehu.activity.AddCustDialogActivity"
|
||||
android:theme="@style/dialogstyle"
|
||||
<activity
|
||||
android:name=".main.kehu.activity.AddCustomerActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".main.kehu.activity.AddCustDialogActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/dialogstyle" />
|
||||
<activity
|
||||
android:name=".main.kehu.activity.StyleActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".main.kehu.activity.StyleActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".main.kehu.activity.BudgetActivity"
|
||||
<activity
|
||||
android:name=".main.kehu.activity.BudgetActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.fenghoo.seven.fileprovider"
|
||||
@@ -120,7 +119,8 @@
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths_public"></meta-data>
|
||||
android:resource="@xml/file_paths_public" />
|
||||
</provider>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -98,6 +98,7 @@ public class PrivateletterFragment extends MobanFragment {
|
||||
FrameLayout mFrameLayout = (FrameLayout)parent;
|
||||
if(mFrameLayout!=null){
|
||||
mFrameLayout.removeView(notDataView);}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,9 +44,11 @@ public class CustomerFragment extends MobanFragment {
|
||||
mSerial = serial;
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
public void setTabPos(int mTabPos) {
|
||||
this.mTabPos = mTabPos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initAdapter() {
|
||||
mMarkingFragmentRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@@ -126,10 +128,11 @@ public class CustomerFragment extends MobanFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 重写下拉刷新方法,让刷新全部数据
|
||||
* @param
|
||||
* @return
|
||||
* @description 重写下拉刷新方法,让刷新全部数据
|
||||
*/
|
||||
public void initRefreshLayout() {
|
||||
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@@ -173,7 +176,9 @@ public class CustomerFragment extends MobanFragment {
|
||||
ViewParent parent = notDataView.getParent();
|
||||
FrameLayout mFrameLayout = (FrameLayout) parent;
|
||||
if (mFrameLayout != null) {
|
||||
mFrameLayout.removeView(notDataView);}
|
||||
mFrameLayout.removeView(notDataView);
|
||||
}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
@@ -187,6 +192,7 @@ public class CustomerFragment extends MobanFragment {
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -196,15 +202,16 @@ public class CustomerFragment extends MobanFragment {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除客户
|
||||
* @param
|
||||
* @return
|
||||
* @description 删除客户
|
||||
*/
|
||||
private void deleteCus(String customer_id) {
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
@@ -221,6 +228,7 @@ public class CustomerFragment extends MobanFragment {
|
||||
ToastUtils.showToast(getActivity(), result.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -33,14 +33,17 @@ public class DealFragment extends MobanFragment {
|
||||
private static int mSerial = 0;
|
||||
private int mTabPos = 0;
|
||||
private String search;
|
||||
|
||||
public DealFragment(int serial) {
|
||||
super();
|
||||
mSerial = serial;
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
public void setTabPos(int mTabPos) {
|
||||
this.mTabPos = mTabPos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initAdapter() {
|
||||
mMarkingFragmentRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@@ -71,10 +74,11 @@ public class DealFragment extends MobanFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 重写下拉刷新方法,让刷新全部数据
|
||||
* @param
|
||||
* @return
|
||||
* @description 重写下拉刷新方法,让刷新全部数据
|
||||
*/
|
||||
public void initRefreshLayout() {
|
||||
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@@ -85,6 +89,7 @@ public class DealFragment extends MobanFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onEvent(ThreeEvent event) {
|
||||
if (null != event) {
|
||||
String pagetype = event.getPagetype();
|
||||
@@ -114,7 +119,9 @@ public class DealFragment extends MobanFragment {
|
||||
ViewParent parent = notDataView.getParent();
|
||||
FrameLayout mFrameLayout = (FrameLayout) parent;
|
||||
if (mFrameLayout != null) {
|
||||
mFrameLayout.removeView(notDataView);}
|
||||
mFrameLayout.removeView(notDataView);
|
||||
}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
@@ -128,6 +135,7 @@ public class DealFragment extends MobanFragment {
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -32,14 +32,17 @@ public class DistriFragment extends MobanFragment {
|
||||
private static int mSerial = 0;
|
||||
private int mTabPos = 0;
|
||||
private String search;
|
||||
|
||||
public DistriFragment(int serial) {
|
||||
super();
|
||||
mSerial = serial;
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
public void setTabPos(int mTabPos) {
|
||||
this.mTabPos = mTabPos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initAdapter() {
|
||||
mMarkingFragmentRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@@ -65,10 +68,11 @@ public class DistriFragment extends MobanFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 重写下拉刷新方法,让刷新全部数据
|
||||
* @param
|
||||
* @return
|
||||
* @description 重写下拉刷新方法,让刷新全部数据
|
||||
*/
|
||||
public void initRefreshLayout() {
|
||||
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@@ -79,6 +83,7 @@ public class DistriFragment extends MobanFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onEvent(ThreeEvent event) {
|
||||
if (null != event) {
|
||||
String pagetype = event.getPagetype();
|
||||
@@ -113,7 +118,9 @@ public class DistriFragment extends MobanFragment {
|
||||
ViewParent parent = notDataView.getParent();
|
||||
FrameLayout mFrameLayout = (FrameLayout) parent;
|
||||
if (mFrameLayout != null) {
|
||||
mFrameLayout.removeView(notDataView);}
|
||||
mFrameLayout.removeView(notDataView);
|
||||
}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
@@ -127,6 +134,7 @@ public class DistriFragment extends MobanFragment {
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.widget.TextView;
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.base.BaseTreeFragment;
|
||||
import com.fenghoo.seven.dialog.BaseTipsDialog;
|
||||
import com.fenghoo.seven.main.find.ConversationActivity;
|
||||
import com.fenghoo.seven.main.my.activity.DemoActivity;
|
||||
import com.fenghoo.seven.main.my.fragment.mvp.contract.MyContract;
|
||||
import com.fenghoo.seven.main.my.fragment.mvp.presenter.MyPresenterImpl;
|
||||
import com.fenghoo.seven.main.activity.LoginPasswordActivity;
|
||||
@@ -16,6 +18,7 @@ import com.fenghoo.seven.main.activity.Main2Activity;
|
||||
import com.fenghoo.seven.main.my.activity.PersonalProfileActivity;
|
||||
import com.fenghoo.seven.main.my.entity.loginInfoBean;
|
||||
import com.fenghoo.seven.utils.GlideTools;
|
||||
import com.fenghoo.seven.utils.JumpUtils;
|
||||
import com.fenghoo.seven.utils.ToastUtils;
|
||||
import com.fenghoo.seven.utils.ToolsUtils;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
@@ -98,20 +101,20 @@ public class MyFragment
|
||||
view.findViewById(R.id.lay_out).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
new BaseTipsDialog().showDownloadDialog(getActivity(), "确认要退出登录吗?", "确定", new BaseTipsDialog.ClickListener() {
|
||||
@Override
|
||||
public void confirm() {
|
||||
ProfileSpUtils.getInstance().saveLoginSatus(false);
|
||||
Intent intent = new Intent(getActivity(), LoginPasswordActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancle() {
|
||||
|
||||
}
|
||||
});
|
||||
JumpUtils.gotoActivity(getActivity(), DemoActivity.class, false, "", "");
|
||||
// new BaseTipsDialog().showDownloadDialog(getActivity(), "确认要退出登录吗?", "确定", new BaseTipsDialog.ClickListener() {
|
||||
// @Override
|
||||
// public void confirm() {
|
||||
// ProfileSpUtils.getInstance().saveLoginSatus(false);
|
||||
// Intent intent = new Intent(getActivity(), LoginPasswordActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
// startActivity(intent);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void cancle() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.fenghoo.seven.main.my.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.fenghoo.seven.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class DemoActivity extends AppCompatActivity {
|
||||
private RvAdapterPrizeInfo adapter;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_demo);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
|
||||
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.rv_prize_info);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
recyclerView.setHasFixedSize(true);
|
||||
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
// for (int i=0; i<10; i++) {
|
||||
//
|
||||
// strings.add("客户李**已在西安开单成交 13:48:19");
|
||||
// }
|
||||
strings.add("1客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("2客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("3客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("4客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("5客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("6客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("7客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("8客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("9客户李**已在西安开单成交 13:48:19");
|
||||
strings.add("10客户李**已在西安开单成交 13:48:19");
|
||||
|
||||
adapter = new RvAdapterPrizeInfo(this);
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.setList(strings);
|
||||
|
||||
ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor();
|
||||
ses.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
adapter.updateList();
|
||||
}
|
||||
}, 2000, 2000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.fenghoo.seven.main.my.activity;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.fenghoo.seven.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* Time: 2020/9/14
|
||||
* Author: jianbo
|
||||
* Description:
|
||||
*/
|
||||
class RvAdapterPrizeInfo extends RecyclerView.Adapter<RvAdapterPrizeInfo.PrizeInfoViewHolder> {
|
||||
|
||||
private Context mContext;
|
||||
private ArrayList<String> prizeList = new ArrayList<>();
|
||||
|
||||
public RvAdapterPrizeInfo(Context context) {
|
||||
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public void setList(ArrayList<String> list) {
|
||||
|
||||
if (list != null && !list.isEmpty()) {
|
||||
|
||||
this.prizeList = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateList() {
|
||||
|
||||
if (!prizeList.isEmpty()) {
|
||||
|
||||
prizeList.add(prizeList.get(0));
|
||||
prizeList.remove(0);
|
||||
notifyItemRangeRemoved(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PrizeInfoViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
|
||||
View view = LayoutInflater.from(viewGroup.getContext())
|
||||
.inflate(R.layout.item_prize_info, viewGroup, false);
|
||||
return new PrizeInfoViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(PrizeInfoViewHolder holder, int i) {
|
||||
|
||||
String info = prizeList.get(i);
|
||||
holder.tv.setText(info);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
class PrizeInfoViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
private TextView tv;
|
||||
PrizeInfoViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
tv = (TextView) itemView.findViewById(R.id.tv_prize_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
app/src/main/res/layout/activity_demo.xml
Normal file
12
app/src/main/res/layout/activity_demo.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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"
|
||||
tools:context=".main.my.activity.DemoActivity">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_prize_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
16
app/src/main/res/layout/item_prize_info.xml
Normal file
16
app/src/main/res/layout/item_prize_info.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#565656"/>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user