[function]基础功能
This commit is contained in:
parent
50beff3dc7
commit
5656657afb
|
|
@ -38,4 +38,6 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
implementation 'com.github.felHR85:UsbSerial:6.1.0'
|
||||
implementation 'androidx.paging:paging-runtime:3.0.0-alpha07'
|
||||
implementation 'com.tencent:mmkv-static:1.2.7'
|
||||
}
|
||||
|
|
@ -9,29 +9,37 @@
|
|||
|
||||
|
||||
<application
|
||||
android:name=".APP"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:name=".APP"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Skipping">
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".activity.MainActivity">
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.MainActivity2"
|
||||
android:exported="true" />
|
||||
<activity android:name=".activity.HostActivity" />
|
||||
<activity android:name=".activity.NetActivity" />
|
||||
<activity android:name=".activity.SplashActivity"
|
||||
android:theme="@style/AppTheme.SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".activity.MainActivity2"
|
||||
android:exported="true"/>
|
||||
<activity android:name=".activity.HostActivity" />
|
||||
<activity android:name=".activity.NetActivity" />
|
||||
<activity android:name=".activity.grade.GradeActivity" />
|
||||
<activity android:name=".activity.clasz.ClassActivity" />
|
||||
<activity android:name=".activity.list.ListActivity" />
|
||||
<activity android:name=".activity.detail.DetailActivity" />
|
||||
|
||||
<service
|
||||
android:name="com.loop.loopminisdk.LoopMini"
|
||||
android:enabled="true">
|
||||
</service>
|
||||
android:enabled="true"></service>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -3,10 +3,16 @@ package com.skipping;
|
|||
|
||||
|
||||
import com.libs.fragment.BaseApplication;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/14/22
|
||||
*/
|
||||
public class APP extends BaseApplication {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
MMKV.initialize(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,19 @@ public class Contants {
|
|||
public final static String GRADE = "grade";
|
||||
|
||||
public final static String UNFINISHED = "未完成";
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
public final static String ACCOUNT = "account";
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
public final static String PASSWORD = "password";
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
public final static String TOKEN = "token";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@ package com.skipping.activity;
|
|||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.libs.fragment.BaseActivity;
|
||||
import com.libs.network.CallBack;
|
||||
|
|
@ -29,11 +34,13 @@ import java.util.List;
|
|||
* 3/15/22
|
||||
*/
|
||||
public class NetActivity extends BaseActivity {
|
||||
private RecyclerView recyclerview;
|
||||
private Button btn, btn2, btn3, btn4, btn5, btn6, btn7;
|
||||
private Concise<API> tokenConcise = new Concise<API>(Contants.BASE_URL) {
|
||||
}.build();
|
||||
private Concise<API> concise;
|
||||
|
||||
private NetRecyclerAdapter adapter;
|
||||
private LinearLayoutManager linearLayoutManager;
|
||||
@Override
|
||||
protected int getContentViewResId() {
|
||||
return R.layout.activity_net;
|
||||
|
|
@ -48,6 +55,17 @@ public class NetActivity extends BaseActivity {
|
|||
btn5 = findViewById(R.id.btn5);
|
||||
btn6 = findViewById(R.id.btn6);
|
||||
btn7 = findViewById(R.id.btn7);
|
||||
recyclerview = findViewById(R.id.recyclerview);
|
||||
linearLayoutManager = new LinearLayoutManager(this);
|
||||
recyclerview.setLayoutManager(linearLayoutManager);
|
||||
adapter = new NetRecyclerAdapter(recyclerview);
|
||||
recyclerview.setAdapter(adapter);
|
||||
recyclerview.setOnScrollChangeListener(new View.OnScrollChangeListener() {
|
||||
@Override
|
||||
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
|
||||
LogUtil.e("最后一个可见",linearLayoutManager.findLastCompletelyVisibleItemPosition());
|
||||
}
|
||||
});
|
||||
|
||||
btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
@ -112,12 +130,13 @@ public class NetActivity extends BaseActivity {
|
|||
bean.setActivityType("timing");
|
||||
bean.setGroupID("77bba9124a4281bc9f92f965561cd5");
|
||||
bean.setIndex(1);
|
||||
bean.setPageSize(10);
|
||||
bean.setPageSize(5);
|
||||
bean.setStatus(Contants.UNFINISHED);
|
||||
concise.request(NetActivity.this, concise.api.getActivityList(bean), new CallBack<BaseBean<List<ActivityBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<List<ActivityBean>> listBaseBean) {
|
||||
|
||||
adapter.setData(listBaseBean.getData());
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -155,9 +174,9 @@ public class NetActivity extends BaseActivity {
|
|||
btn6.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
concise.request(NetActivity.this, concise.api.detailActivity("15"), new CallBack<BaseBean<List<DetailActivityBean>>>() {
|
||||
concise.request(NetActivity.this, concise.api.detailActivity("15"), new CallBack<BaseBean<DetailActivityBean>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<List<DetailActivityBean>> listBaseBean) {
|
||||
public void onSuccess(BaseBean<DetailActivityBean> listBaseBean) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
package com.skipping.activity;
import android.content.Context;
import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.skipping.R;
import com.skipping.net.ActivityBean;
import java.util.ArrayList;
import java.util.List;
/**
* @author Ming
* 1/6/22
*/
public class NetRecyclerAdapter extends RecyclerView.Adapter<NetRecyclerAdapter.RecyclerHolder> {
private Context mContext;
private List<ActivityBean> list = new ArrayList<>();
public NetRecyclerAdapter(RecyclerView recyclerView) {
this.mContext = recyclerView.getContext();
}
public void setData(List<ActivityBean> list) {
this.list = list;
}
@Override
public RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(mContext).inflate(R.layout.net_item, parent, false);
return new RecyclerHolder(view);
}
@Override
public void onBindViewHolder(RecyclerHolder holder, int position) {
holder.textView.setText(list.get(position).toString());
}
@Override
public int getItemCount() {
return list.size();
}
class RecyclerHolder extends RecyclerView.ViewHolder {
TextView textView;
private RecyclerHolder(View itemView) {
super(itemView);
textView = itemView.findViewById(R.id.text);
}
}
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.skipping.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.libs.fragment.BaseActivity;
|
||||
import com.libs.network.CallBack;
|
||||
import com.libs.network.Concise;
|
||||
import com.skipping.Contants;
|
||||
import com.skipping.R;
|
||||
import com.skipping.activity.grade.GradeActivity;
|
||||
import com.skipping.net.API;
|
||||
import com.skipping.net.BaseBean;
|
||||
import com.skipping.net.TokenBean;
|
||||
import com.skipping.net.TokenReqBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class SplashActivity extends BaseActivity {
|
||||
private EditText key, value;
|
||||
private Button login;
|
||||
private Concise<API> tokenConcise;
|
||||
|
||||
@Override
|
||||
protected int getContentViewResId() {
|
||||
return R.layout.activity_splash;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
key = findViewById(R.id.key);
|
||||
value = findViewById(R.id.value);
|
||||
login = findViewById(R.id.login);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
login();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void login() {
|
||||
tokenConcise = new Concise<API>(Contants.BASE_URL) {
|
||||
}.build();
|
||||
TokenReqBean tokenReqBean = new TokenReqBean();
|
||||
tokenReqBean.setDeviceID("466e9c");
|
||||
tokenReqBean.setLogName(key.getText().toString());
|
||||
tokenReqBean.setLogPwd(value.getText().toString());
|
||||
tokenConcise.request(SplashActivity.this, tokenConcise.api.token(tokenReqBean), new CallBack<BaseBean<TokenBean>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<TokenBean> tokenBeanBaseBean) {
|
||||
MMKV kv = MMKV.defaultMMKV();
|
||||
kv.encode(Contants.ACCOUNT, key.getText().toString());
|
||||
kv.encode(Contants.PASSWORD, value.getText().toString());
|
||||
kv.encode(Contants.TOKEN, tokenBeanBaseBean.getData().getToken());
|
||||
Intent intent = new Intent(SplashActivity.this, GradeActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.skipping.activity.clasz;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.libs.fragment.BaseActivity;
|
||||
import com.libs.network.CallBack;
|
||||
import com.libs.network.Concise;
|
||||
import com.libs.utils.LogUtil;
|
||||
import com.skipping.Contants;
|
||||
import com.skipping.R;
|
||||
import com.skipping.activity.list.ListActivity;
|
||||
import com.skipping.net.API;
|
||||
import com.skipping.net.BaseBean;
|
||||
import com.skipping.net.GradleBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class ClassActivity extends BaseActivity {
|
||||
private RecyclerView recyclerview;
|
||||
private Concise<API> concise;
|
||||
private ClassAdapter classAdapter;
|
||||
|
||||
@Override
|
||||
protected int getContentViewResId() {
|
||||
return R.layout.activity_show;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
recyclerview = findViewById(R.id.recyclerview);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
String id = (String) getIntent().getBundleExtra("id").get("id");
|
||||
recyclerview.setLayoutManager(new LinearLayoutManager(this));
|
||||
classAdapter = new ClassAdapter(recyclerview);
|
||||
classAdapter.setOnClickListener(new ClassAdapter.OnClick() {
|
||||
@Override
|
||||
public void click(String id) {
|
||||
Intent intent = new Intent(ClassActivity.this, ListActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("id", id);
|
||||
intent.putExtra("id", bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
recyclerview.setAdapter(classAdapter);
|
||||
|
||||
MMKV kv = MMKV.defaultMMKV();
|
||||
concise = new Concise<API>(Contants.BASE_URL) {
|
||||
}.addHeader("Token", kv.decodeString(Contants.TOKEN)).build();
|
||||
concise.request(ClassActivity.this, concise.api.getClass(id), new CallBack<BaseBean<List<GradleBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<List<GradleBean>> listBaseBean) {
|
||||
classAdapter.setData(listBaseBean.getData());
|
||||
classAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.skipping.activity.clasz;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.skipping.R;
|
||||
import com.skipping.net.GradleBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class ClassAdapter extends RecyclerView.Adapter<ClassAdapter.RecyclerHolder> {
|
||||
private OnClick onClick;
|
||||
private Context mContext;
|
||||
private List<GradleBean> list = new ArrayList<>();
|
||||
|
||||
public ClassAdapter(RecyclerView recyclerView) {
|
||||
this.mContext = recyclerView.getContext();
|
||||
}
|
||||
|
||||
public void setData(List<GradleBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassAdapter.RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.grade_item, parent, false);
|
||||
return new ClassAdapter.RecyclerHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ClassAdapter.RecyclerHolder holder, int position) {
|
||||
holder.title.setText("班级名称:" + list.get(position).getGroupName());
|
||||
holder.name.setText("班级ID:" + list.get(position).getGroupID());
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onClick.click(list.get(position).getGroupID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class RecyclerHolder extends RecyclerView.ViewHolder {
|
||||
TextView title;
|
||||
TextView name;
|
||||
|
||||
private RecyclerHolder(View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
name = itemView.findViewById(R.id.name);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnClickListener(OnClick onClick){
|
||||
this.onClick = onClick;
|
||||
}
|
||||
|
||||
public interface OnClick{
|
||||
void click(String id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.skipping.activity.detail;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.libs.fragment.BaseActivity;
|
||||
import com.libs.network.CallBack;
|
||||
import com.libs.network.Concise;
|
||||
import com.skipping.Contants;
|
||||
import com.skipping.R;
|
||||
import com.skipping.activity.NetActivity;
|
||||
import com.skipping.activity.clasz.ClassActivity;
|
||||
import com.skipping.activity.grade.GradeActivity;
|
||||
import com.skipping.activity.grade.GradeAdapter;
|
||||
import com.skipping.net.API;
|
||||
import com.skipping.net.BaseBean;
|
||||
import com.skipping.net.DetailActivityBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class DetailActivity extends BaseActivity {
|
||||
private Concise<API> concise;
|
||||
private TextView name, idTV;
|
||||
private RecyclerView recyclerview;
|
||||
private DetailAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected int getContentViewResId() {
|
||||
return R.layout.activity_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
idTV = findViewById(R.id.id);
|
||||
name = findViewById(R.id.name);
|
||||
recyclerview = findViewById(R.id.recyclerview);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
String id = (String) getIntent().getBundleExtra("id").get("id");
|
||||
recyclerview.setLayoutManager(new LinearLayoutManager(this));
|
||||
adapter = new DetailAdapter(recyclerview);
|
||||
recyclerview.setAdapter(adapter);
|
||||
|
||||
MMKV kv = MMKV.defaultMMKV();
|
||||
concise = new Concise<API>(Contants.BASE_URL) {
|
||||
}.addHeader("Token", kv.decodeString(Contants.TOKEN)).build();
|
||||
concise.request(DetailActivity.this, concise.api.detailActivity(id), new CallBack<BaseBean<DetailActivityBean>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<DetailActivityBean> listBaseBean) {
|
||||
idTV.setText(listBaseBean.getData().getId() + "");
|
||||
name.setText(listBaseBean.getData().getActivityName() + "");
|
||||
adapter.setData(listBaseBean.getData().getCandidates().get(0));
|
||||
adapter.notifyDataSetChanged();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.skipping.activity.detail;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.skipping.R;
|
||||
import com.skipping.net.DetailActivityBean;
|
||||
import com.skipping.net.GradleBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class DetailAdapter extends RecyclerView.Adapter<DetailAdapter.RecyclerHolder> {
|
||||
private OnClick onClick;
|
||||
private Context mContext;
|
||||
private List<DetailActivityBean.CandidatesBean> list = new ArrayList<>();
|
||||
|
||||
public DetailAdapter(RecyclerView recyclerView) {
|
||||
this.mContext = recyclerView.getContext();
|
||||
}
|
||||
|
||||
public void setData(List<DetailActivityBean.CandidatesBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DetailAdapter.RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.detail_item, parent, false);
|
||||
return new DetailAdapter.RecyclerHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(DetailAdapter.RecyclerHolder holder, int position) {
|
||||
holder.name.setText("学生名称:" + list.get(position).getName());
|
||||
holder.id.setText("ID:" + list.get(position).getPersonID());
|
||||
holder.studentid.setText("学生ID:" + list.get(position).getStudentID());
|
||||
holder.score.setText("分数:" + list.get(position).getScore());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class RecyclerHolder extends RecyclerView.ViewHolder {
|
||||
TextView name, id, studentid, score;
|
||||
|
||||
private RecyclerHolder(View itemView) {
|
||||
super(itemView);
|
||||
name = itemView.findViewById(R.id.name);
|
||||
id = itemView.findViewById(R.id.id);
|
||||
studentid = itemView.findViewById(R.id.studentid);
|
||||
score = itemView.findViewById(R.id.score);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnClickListener(OnClick onClick) {
|
||||
this.onClick = onClick;
|
||||
}
|
||||
|
||||
public interface OnClick {
|
||||
void click(String id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.skipping.activity.grade;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.libs.fragment.BaseActivity;
|
||||
import com.libs.network.CallBack;
|
||||
import com.libs.network.Concise;
|
||||
import com.skipping.Contants;
|
||||
import com.skipping.R;
|
||||
import com.skipping.activity.SplashActivity;
|
||||
import com.skipping.activity.clasz.ClassActivity;
|
||||
import com.skipping.net.API;
|
||||
import com.skipping.net.BaseBean;
|
||||
import com.skipping.net.GradleBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class GradeActivity extends BaseActivity {
|
||||
private RecyclerView recyclerview;
|
||||
private Concise<API> concise;
|
||||
private GradeAdapter gradeAdapter;
|
||||
|
||||
@Override
|
||||
protected int getContentViewResId() {
|
||||
return R.layout.activity_show;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
recyclerview = findViewById(R.id.recyclerview);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
recyclerview.setLayoutManager(new LinearLayoutManager(this));
|
||||
gradeAdapter = new GradeAdapter(recyclerview);
|
||||
gradeAdapter.setOnClickListener(new GradeAdapter.OnClick() {
|
||||
@Override
|
||||
public void click(String id) {
|
||||
Intent intent = new Intent(GradeActivity.this, ClassActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("id", id);
|
||||
intent.putExtra("id", bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
recyclerview.setAdapter(gradeAdapter);
|
||||
|
||||
MMKV kv = MMKV.defaultMMKV();
|
||||
concise = new Concise<API>(Contants.BASE_URL) {
|
||||
}.addHeader("Token", kv.decodeString(Contants.TOKEN)).build();
|
||||
concise.request(GradeActivity.this, concise.api.getGrade(), new CallBack<BaseBean<List<GradleBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<List<GradleBean>> listBaseBean) {
|
||||
gradeAdapter.setData(listBaseBean.getData());
|
||||
gradeAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.skipping.activity.grade;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.skipping.R;
|
||||
import com.skipping.net.GradleBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class GradeAdapter extends RecyclerView.Adapter<GradeAdapter.RecyclerHolder> {
|
||||
private OnClick onClick;
|
||||
private Context mContext;
|
||||
private List<GradleBean> list = new ArrayList<>();
|
||||
|
||||
public GradeAdapter(RecyclerView recyclerView) {
|
||||
this.mContext = recyclerView.getContext();
|
||||
}
|
||||
|
||||
public void setData(List<GradleBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GradeAdapter.RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.grade_item, parent, false);
|
||||
return new GradeAdapter.RecyclerHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(GradeAdapter.RecyclerHolder holder, int position) {
|
||||
holder.title.setText("年级名称:" + list.get(position).getGroupName());
|
||||
holder.name.setText("年级ID:" + list.get(position).getGroupID());
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onClick.click(list.get(position).getGroupID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class RecyclerHolder extends RecyclerView.ViewHolder {
|
||||
TextView title;
|
||||
TextView name;
|
||||
|
||||
private RecyclerHolder(View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
name = itemView.findViewById(R.id.name);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnClickListener(OnClick onClick){
|
||||
this.onClick = onClick;
|
||||
}
|
||||
|
||||
public interface OnClick{
|
||||
void click(String id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.skipping.activity.list;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.libs.fragment.BaseActivity;
|
||||
import com.libs.network.CallBack;
|
||||
import com.libs.network.Concise;
|
||||
import com.libs.utils.LogUtil;
|
||||
import com.skipping.Contants;
|
||||
import com.skipping.R;
|
||||
import com.skipping.activity.NetActivity;
|
||||
import com.skipping.activity.clasz.ClassActivity;
|
||||
import com.skipping.activity.detail.DetailActivity;
|
||||
import com.skipping.activity.grade.GradeAdapter;
|
||||
import com.skipping.net.API;
|
||||
import com.skipping.net.ActivityBean;
|
||||
import com.skipping.net.ActivityReqBean;
|
||||
import com.skipping.net.BaseBean;
|
||||
import com.skipping.net.GradleBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class ListActivity extends BaseActivity {
|
||||
private RecyclerView recyclerview;
|
||||
private Concise<API> concise;
|
||||
private ListAdapter listAdapter;
|
||||
|
||||
@Override
|
||||
protected int getContentViewResId() {
|
||||
return R.layout.activity_show;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
recyclerview = findViewById(R.id.recyclerview);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
String id = (String) getIntent().getBundleExtra("id").get("id");
|
||||
recyclerview.setLayoutManager(new LinearLayoutManager(this));
|
||||
listAdapter = new ListAdapter(recyclerview);
|
||||
listAdapter.setOnClickListener(new ListAdapter.OnClick() {
|
||||
@Override
|
||||
public void click(String id) {
|
||||
Intent intent = new Intent(ListActivity.this, DetailActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("id", id);
|
||||
intent.putExtra("id", bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
recyclerview.setAdapter(listAdapter);
|
||||
|
||||
MMKV kv = MMKV.defaultMMKV();
|
||||
concise = new Concise<API>(Contants.BASE_URL) {
|
||||
}.addHeader("Token", kv.decodeString(Contants.TOKEN)).build();
|
||||
ActivityReqBean bean = new ActivityReqBean();
|
||||
bean.setGenre(Contants.CLASS);
|
||||
bean.setActivityType("timing");
|
||||
bean.setGroupID(id);
|
||||
bean.setIndex(1);
|
||||
bean.setPageSize(10);
|
||||
bean.setStatus(Contants.UNFINISHED);
|
||||
LogUtil.e("提交",bean);
|
||||
concise.request(ListActivity.this, concise.api.getActivityList(bean), new CallBack<BaseBean<List<ActivityBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<List<ActivityBean>> listBaseBean) {
|
||||
listAdapter.setData(listBaseBean.getData());
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.skipping.activity.list;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.skipping.R;
|
||||
import com.skipping.net.ActivityBean;
|
||||
import com.skipping.net.GradleBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ming
|
||||
* 3/18/22
|
||||
*/
|
||||
public class ListAdapter extends RecyclerView.Adapter<ListAdapter.RecyclerHolder> {
|
||||
private OnClick onClick;
|
||||
private Context mContext;
|
||||
private List<ActivityBean> list = new ArrayList<>();
|
||||
|
||||
public ListAdapter(RecyclerView recyclerView) {
|
||||
this.mContext = recyclerView.getContext();
|
||||
}
|
||||
|
||||
public void setData(List<ActivityBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListAdapter.RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.list_item, parent, false);
|
||||
return new ListAdapter.RecyclerHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ListAdapter.RecyclerHolder holder, int position) {
|
||||
holder.title.setText("活动ID:" + list.get(position).getId() + "");
|
||||
holder.name.setText("活动名称:" + list.get(position).getName() + "");
|
||||
holder.orgid.setText("OrgID:" + list.get(position).getOrgID() + "");
|
||||
holder.greadid.setText("GreadID:" + list.get(position).getGreadID() + "");
|
||||
holder.classid.setText("ClassID:" + list.get(position).getClassID() + "");
|
||||
holder.preson.setText("人数:" + list.get(position).getPersonNumber() + "");
|
||||
holder.status.setText("状态:" + list.get(position).getStatus() + "");
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onClick.click(list.get(position).getId() + "");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class RecyclerHolder extends RecyclerView.ViewHolder {
|
||||
TextView title, name, orgid, greadid, classid, preson, status;
|
||||
|
||||
private RecyclerHolder(View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
name = itemView.findViewById(R.id.name);
|
||||
orgid = itemView.findViewById(R.id.orgid);
|
||||
greadid = itemView.findViewById(R.id.greadid);
|
||||
classid = itemView.findViewById(R.id.classid);
|
||||
preson = itemView.findViewById(R.id.preson);
|
||||
status = itemView.findViewById(R.id.status);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnClickListener(OnClick onClick) {
|
||||
this.onClick = onClick;
|
||||
}
|
||||
|
||||
public interface OnClick {
|
||||
void click(String id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ public interface API {
|
|||
* @return
|
||||
*/
|
||||
@GET("activity/detail")
|
||||
Observable<BaseBean<List<DetailActivityBean>>> detailActivity(@Query("activityid") String id);
|
||||
Observable<BaseBean<DetailActivityBean>> detailActivity(@Query("activityid") String id);
|
||||
|
||||
/**
|
||||
* 上报
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class ActivityBean implements Serializable {
|
|||
* CreatedAt : 2022-03-14T08:38:21.495+08:00
|
||||
*/
|
||||
|
||||
private Integer id;
|
||||
private Integer ID;
|
||||
private String Name;
|
||||
private String ActivityType;
|
||||
private Integer Value;
|
||||
|
|
@ -41,11 +41,11 @@ public class ActivityBean implements Serializable {
|
|||
private String CreatedAt;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
return ID;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
this.ID = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
|
@ -147,7 +147,7 @@ public class ActivityBean implements Serializable {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "ActivityBean{" +
|
||||
"id=" + id +
|
||||
"ID=" + ID +
|
||||
", Name='" + Name + '\'' +
|
||||
", ActivityType='" + ActivityType + '\'' +
|
||||
", Value=" + Value +
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class DetailActivityBean implements Serializable {
|
|||
* Candidates : [[{"PersonID":"329b20b046f5888bcd5165d115f1","Name":"xiaofang","StudentID":"1002","Score":12,"Detail":null},{"PersonID":"4557de13408aaf9057752285c81a","Name":"xiaohai","StudentID":"1003","Score":8,"Detail":null},{"PersonID":"4dee38df466fa8469f0e62f672fb","Name":"xiaoli","StudentID":"1004","Score":9,"Detail":null}]]
|
||||
*/
|
||||
|
||||
private Integer id;
|
||||
private Integer ID;
|
||||
private String ActivityName;
|
||||
private String ActivityType;
|
||||
private Integer ActivityValue;
|
||||
|
|
@ -34,11 +34,11 @@ public class DetailActivityBean implements Serializable {
|
|||
private List<List<CandidatesBean>> Candidates;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
return ID;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
this.ID = id;
|
||||
}
|
||||
|
||||
public String getActivityName() {
|
||||
|
|
@ -108,7 +108,7 @@ public class DetailActivityBean implements Serializable {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "DetailActivityBean{" +
|
||||
"id=" + id +
|
||||
"id=" + ID +
|
||||
", ActivityName='" + ActivityName + '\'' +
|
||||
", ActivityType='" + ActivityType + '\'' +
|
||||
", ActivityValue=" + ActivityValue +
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@color/main_color"></item>
|
||||
|
||||
<item android:top="30dp">
|
||||
<bitmap
|
||||
android:gravity="top"
|
||||
android:src="@drawable/ic_launcher_round"></bitmap>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@color/color_CCCCCC" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -48,4 +48,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="活动成绩上传接口" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="账号"
|
||||
android:textColor="@color/color_black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/key"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="loop"
|
||||
android:textColor="@color/color_black" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="密码"
|
||||
android:textColor="@color/color_black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/value"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="123456"
|
||||
android:textColor="@color/color_black" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:background="@color/main_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="登 录" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?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"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/studentid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/score"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/color_CCCCCC" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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:padding="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/color_CCCCCC"
|
||||
android:layout_height="1dp"/>
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?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"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/orgid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/greadid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/classid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preson"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/color_CCCCCC" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
</TextView>
|
||||
|
|
@ -7,4 +7,6 @@
|
|||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="main_color">#ffc20e</color>
|
||||
<color name="ffc20e">#ffc20e</color>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="SplashTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/main_color</item>
|
||||
<item name="colorPrimaryDark">@color/main_color</item>
|
||||
<item name="colorAccent">@color/main_color</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowBackground">@drawable/splash_preview</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -13,4 +13,17 @@
|
|||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/main_color</item>
|
||||
<item name="colorPrimaryDark">@color/main_color</item>
|
||||
<item name="colorAccent">@color/main_color</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.SplashTheme">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowBackground">@drawable/splash_preview</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Loading…
Reference in New Issue