提交 49192835 authored 作者: lgd's avatar lgd

1.修改页面样式

2.添加util,华为对象存储引用
3.修改别名问题
上级 e0ca23cf
......@@ -105,4 +105,6 @@ dependencies {
implementation 'cn.jiguang.sdk:jcore:2.1.2'
implementation 'com.huawei.storage:esdk-obs-android:3.1.3'
implementation 'com.blankj:utilcodex:1.29.0'
}
......@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wd.workoffice">
<uses-permission android:name="com.qdredsoft.ylh.permission.JPUSH_MESSAGE" />
<uses-permission android:name="com.wd.workoffice.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<!-- Optional. Required for location feature -->
......@@ -22,6 +22,7 @@
<uses-permission android:name="com.wd.workoffice.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.GET_TOP_ACTIVITY_INFO" />
<permission
android:name="com.wd.workoffice.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" />
......@@ -38,7 +39,7 @@
android:name=".ui.activity.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask"
android:theme="@style/Work.Base"
android:theme="@style/Work.Base.Main"
android:windowSoftInputMode="adjustPan">
</activity>
<activity
......
......@@ -47,6 +47,7 @@ import butterknife.ButterKnife;
import cn.jpush.android.api.JPushInterface;
import flexible.xd.android_base.base.AppManager;
import flexible.xd.android_base.model.event.LoginEvent;
import flexible.xd.android_base.utils.BarUtils;
import me.jessyan.autosize.internal.CancelAdapt;
public class MainActivity extends WorkBaseActivity implements BottomNavigationBar.OnTabSelectedListener, View.OnClickListener, CancelAdapt {
......@@ -71,9 +72,10 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
startActivity(MainLoginActivity.class);
return;
}
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()), 2);
if (!TextUtils.isEmpty(UserKeeper.getInstance().getLoginInfo()))
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()), 2);
ButterKnife.bind(this);
QMUIStatusBarHelper.translucent(this);
// QMUIStatusBarHelper.translucent(this);
QMUIStatusBarHelper.setStatusBarLightMode(this);
bnbMainBottomBar.setMode(BottomNavigationBar.MODE_FIXED);
bnbMainBottomBar.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC);
......@@ -173,6 +175,24 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
}
oldPosition = position;
mainContent.setCurrentItem(position);
switch (position) {
case 0:
com.blankj.utilcode.util.BarUtils.setStatusBarColor(this, Color.WHITE);
break;
case 1:
com.blankj.utilcode.util.BarUtils.setStatusBarColor(this, Color.parseColor("#fff5a623"));
break;
case 2:
com.blankj.utilcode.util.BarUtils.setStatusBarColor(this, Color.WHITE);
break;
case 3:
com.blankj.utilcode.util.BarUtils.setStatusBarColor(this, Color.WHITE);
break;
case 4:
com.blankj.utilcode.util.BarUtils.setStatusBarColor(this, Color.parseColor("#fff5a623"));
break;
}
}
@Override
......@@ -229,7 +249,7 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
UserKeeper.getInstance().clearAll();
startActivity(intent);
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()),1);
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()), 1);
}
}
......
......@@ -104,7 +104,8 @@ public class UserSettingActivity extends WorkToolBarActivity {
private void logout() {
toast("退出成功");
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()),1);
if (!TextUtils.isEmpty(UserKeeper.getInstance().getLoginInfo()))
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()),1);
Intent intent = new Intent(UserSettingActivity.this, MainLoginActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
UserKeeper.getInstance().clearAll();
......
......@@ -14,7 +14,6 @@ import com.wd.workoffice.util.UserKeeper;
import java.util.ArrayList;
import java.util.List;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
......
......@@ -46,6 +46,7 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* author : flexible
* email : lgd19940421@163.com
......
......@@ -7,10 +7,10 @@
android:orientation="vertical">
<!--<View-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="25mm"-->
<!--android:background="@color/white" />-->
<View
android:layout_width="match_parent"
android:layout_height="25mm"
android:background="@color/white" />
......
......@@ -9,7 +9,7 @@
android:id="@+id/tl_tab"
android:layout_width="match_parent"
android:layout_height="48mm"
android:layout_marginTop="20mm"
android:layout_marginTop="25mm"
android:background="@android:color/white"
app:tabBackground="@android:color/white"
app:tabGravity="fill"
......
......@@ -5,107 +5,145 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="150mm"
android:background="@drawable/shape_work_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50mm"
android:paddingHorizontal="20mm"
android:text="工作台"
android:textSize="20sp" />
<androidx.cardview.widget.CardView
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
android:layout_marginTop="100mm"
android:layout_marginBottom="10mm"
android:background="@color/white"
app:cardCornerRadius="4dp"
app:cardElevation="10dp">
<LinearLayout
android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="150mm"
android:background="@drawable/shape_work_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15mm">
android:layout_marginTop="50mm"
android:paddingHorizontal="20mm"
android:text="工作台"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="审批"
android:textSize="16sp" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
android:layout_marginTop="100mm"
android:layout_marginBottom="10mm"
android:background="@color/white"
app:cardCornerRadius="4dp"
app:cardElevation="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
android:orientation="vertical"
android:padding="15mm">
<FrameLayout
android:layout_width="0dp"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
android:text="审批"
android:textSize="16sp" />
<LinearLayout
android:id="@+id/ll_submit"
android:layout_width="match_parent"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
android:layout_weight="1">
<ImageView
android:layout_width="32mm"
android:layout_height="32mm"
android:src="@mipmap/work_not_check" />
<LinearLayout
android:id="@+id/ll_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="32mm"
android:layout_height="32mm"
android:src="@mipmap/work_not_check" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6mm"
android:text="我发起的"
android:textColor="#ff798188"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6mm"
android:text="我发起的"
android:textColor="#ff798188"
android:textSize="14sp" />
</LinearLayout>
android:id="@+id/tv_submit_num"
android:layout_width="18mm"
android:layout_height="18mm"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20mm"
android:layout_marginTop="5mm"
android:background="@drawable/shape_circle_red"
android:gravity="center"
android:text="0"
android:textColor="@color/white"
android:textSize="11sp" />
</FrameLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/tv_submit_num"
android:layout_width="18mm"
android:layout_height="18mm"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20mm"
android:layout_marginTop="5mm"
android:textSize="11sp"
android:background="@drawable/shape_circle_red"
android:gravity="center"
android:text="0"
android:textColor="@color/white" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_not_deal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="32mm"
android:layout_height="32mm"
android:src="@mipmap/work_not_deal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6mm"
android:text="待我审核"
android:textColor="#ff798188"
android:textSize="14sp" />
</LinearLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/tv_not_deal_num"
android:layout_width="18mm"
android:layout_height="18mm"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20mm"
android:layout_marginTop="5mm"
android:background="@drawable/shape_circle_red"
android:gravity="center"
android:text="0"
android:textColor="@color/white"
android:textSize="11sp" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_not_deal"
android:layout_width="match_parent"
android:id="@+id/ll_deal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
......@@ -114,59 +152,21 @@
<ImageView
android:layout_width="32mm"
android:layout_height="32mm"
android:src="@mipmap/work_not_deal" />
android:src="@mipmap/work_deal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6mm"
android:text="待我审核"
android:text="我处理的"
android:textColor="#ff798188"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_not_deal_num"
android:layout_width="18mm"
android:layout_height="18mm"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20mm"
android:layout_marginTop="5mm"
android:textSize="11sp"
android:background="@drawable/shape_circle_red"
android:gravity="center"
android:text="0"
android:textColor="@color/white" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_deal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="32mm"
android:layout_height="32mm"
android:src="@mipmap/work_deal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6mm"
android:text="我处理的"
android:textColor="#ff798188"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<LinearLayout
......@@ -220,6 +220,6 @@
android:paddingHorizontal="20mm" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
\ No newline at end of file
......@@ -17,6 +17,12 @@ buildscript {
allprojects {
repositories {
google()
maven {
url 'http://mirrors.huaweicloud.com/repository/maven/huaweicloudsdk/'
}
maven {
url 'http://mirrors.huaweicloud.com/repository/maven/'
}
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论