mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-07-01 05:14:17 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
File diff suppressed because it is too large
Load diff
Binary file not shown.
After Width: | Height: | Size: 142 B |
|
@ -0,0 +1,64 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.10'
|
||||
repositories {
|
||||
google()
|
||||
maven {
|
||||
url 'http://mss-webdev-svr.ad-ins.com:8081/artifactory/libs-release'
|
||||
}
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven {
|
||||
url 'https://dl.bintray.com/firebase/gradle/'
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.1'
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:perf-plugin:1.3.1'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
|
||||
// classpath 'com.google.firebase:firebase-plugins:1.1.4'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
maven {
|
||||
url 'http://mss-webdev-svr.ad-ins.com:8081/artifactory/libs-release'
|
||||
}
|
||||
maven { url "https://www.jitpack.io" }
|
||||
jcenter {
|
||||
url "https://jcenter.bintray.com/"
|
||||
}
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
//apply from: "$project.rootDir/tools/script-pmd.gradle"
|
||||
apply plugin: 'org.sonarqube'
|
||||
sonarqube
|
||||
{
|
||||
properties
|
||||
{
|
||||
property "sonar.projectName", "MOBILE_AITMSS_ANDROID"
|
||||
property "sonar.projectKey", "MOBILE_AITMSS_ANDROID"
|
||||
property "sonar.language", "java"
|
||||
// property "sonar.sources", "mssbase/src,msscoll/src"
|
||||
property "sonar.binaries", "mssbase/build/generated,mssodr/build/generated,msssvy/build/generated,msscoll/build/generated"
|
||||
property "sonar.sourceEncoding", "UTF-8"
|
||||
property "sonar.login", "a8b892bfa1ee91c401867f9e1b76fafac92154dd"
|
||||
// property "sonar.password", "admin"
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,22 @@
|
|||
package com.adins.mss.coll.models;
|
||||
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by eric.sn on 6/2/2017.
|
||||
*/
|
||||
|
||||
public class DepositReportResponse extends MssResponseType {
|
||||
|
||||
@SerializedName("batch_id")
|
||||
private String batchId;
|
||||
|
||||
public String getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(String batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.adins.mss.svy.tool;
|
||||
|
||||
import com.adins.mss.foundation.http.KeyValue;
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JsonResponseServer extends MssResponseType{
|
||||
@SerializedName("listResponseServer")
|
||||
List<ResponseServer> listResponseServer;
|
||||
|
||||
public List<ResponseServer> getListResponseServer() {
|
||||
return listResponseServer;
|
||||
}
|
||||
public void setListResponseServer(List<ResponseServer> listResponseServer) {
|
||||
this.listResponseServer = listResponseServer;
|
||||
}
|
||||
|
||||
public class ResponseServer extends KeyValue {
|
||||
@SerializedName("flag")
|
||||
String flag;
|
||||
@SerializedName("subListResponseServer")
|
||||
List<ResponseServer> subListResponseServer;
|
||||
|
||||
public ResponseServer(String key, String value) {
|
||||
super(key, value);
|
||||
}
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public List<ResponseServer> getSubListResponseServer() {
|
||||
return subListResponseServer;
|
||||
}
|
||||
|
||||
public void setSubListResponseServer(List<ResponseServer> subListResponseServer) {
|
||||
this.subListResponseServer = subListResponseServer;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/checkin_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bgColor"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<!-- <Button -->
|
||||
<!-- android:id="@+id/btnRefreshCIn" -->
|
||||
<!-- android:layout_width="wrap_content" -->
|
||||
<!-- android:layout_height="wrap_content" -->
|
||||
<!-- android:layout_marginRight="5dp" -->
|
||||
<!-- android:layout_marginTop="5dp" -->
|
||||
<!-- android:text="Refresh" -->
|
||||
<!-- android:layout_gravity="right" /> -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/DescLayoutIn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/lowpriority_background"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/addressImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_absent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textLocalIn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@color/tv_white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textAddressIn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/tv_white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/mapIn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/DescLayoutIn"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignTop="@+id/relativeLayout1"
|
||||
class="com.google.android.gms.maps.SupportMapFragment"
|
||||
android:tag="mapin" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relativeLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@+id/actionbar" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnRefreshCIn"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:src="@drawable/ic_menu_refresh_white"
|
||||
android:background="@drawable/button_background_round"
|
||||
android:elevation="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="5dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!--<View-->
|
||||
<!--android:id="@+id/actionbar"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="48dp"-->
|
||||
<!--android:layout_alignParentLeft="true"-->
|
||||
<!--android:layout_alignParentRight="true"-->
|
||||
<!--android:layout_alignParentTop="true"-->
|
||||
<!--android:background="@drawable/actionbar_background" />-->
|
||||
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,113 @@
|
|||
package com.adins.mss.base.mainmenu.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
import com.adins.mss.base.mainmenu.NewMenuItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by developer on 9/6/17.
|
||||
*/
|
||||
|
||||
public class NewMainMenuAdapter extends RecyclerView.Adapter<NewMainMenuAdapter.MainMenuHolder> {
|
||||
|
||||
private Context context;
|
||||
private List<NewMenuItem> menuItems;
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
public NewMainMenuAdapter(Context context, List<NewMenuItem> menuItems, OnItemClickListener onItemClickListener) {
|
||||
this.context = context;
|
||||
this.menuItems = menuItems;
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public NewMenuItem getMenuItem(String title) {
|
||||
for (NewMenuItem model : menuItems) {
|
||||
if (model.getName().equals(title)) {
|
||||
return model;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(MainMenuHolder holder, int position, List<Object> payloads) {
|
||||
super.onBindViewHolder(holder, position, payloads);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return super.getItemId(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MainMenuHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
return new MainMenuHolder(LayoutInflater.from(parent.getContext()), parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(MainMenuHolder holder, final int position) {
|
||||
final NewMenuItem item = menuItems.get(position);
|
||||
|
||||
holder.itemName.setText(item.getName());
|
||||
holder.itemIcon.setImageDrawable(context.getResources().getDrawable(item.getIcon()));
|
||||
|
||||
if (item.getCounter() != null) {
|
||||
holder.itemCounter.setVisibility(View.VISIBLE);
|
||||
holder.itemCounter.setText(item.getCounter());
|
||||
} else
|
||||
holder.itemCounter.setVisibility(View.GONE);
|
||||
|
||||
if (null != holder.itemView) {
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
try {
|
||||
onItemClickListener.OnItemClick(item, position);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return (menuItems != null) ? menuItems.size() : 0;
|
||||
}
|
||||
|
||||
public NewMenuItem OnItemClick(NewMenuItem menuItem, int position) {
|
||||
return onItemClickListener.OnItemClick(menuItem, position);
|
||||
}
|
||||
|
||||
public static class MainMenuHolder extends RecyclerView.ViewHolder {
|
||||
TextView itemName;
|
||||
ImageView itemIcon;
|
||||
TextView itemCounter;
|
||||
|
||||
public MainMenuHolder(LayoutInflater inflater, ViewGroup viewGroup) {
|
||||
super(inflater.inflate(R.layout.new_menu_item, viewGroup, false));
|
||||
|
||||
itemName = (TextView) itemView.findViewById(R.id.itemName);
|
||||
itemIcon = (ImageView) itemView.findViewById(R.id.itemIcon);
|
||||
itemCounter = (TextView) itemView.findViewById(R.id.counter);
|
||||
}
|
||||
}
|
||||
|
||||
public static class OnItemClickListener {
|
||||
public NewMenuItem OnItemClick(NewMenuItem menuItem, int position) {
|
||||
System.out.println(position);
|
||||
return menuItem;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 7.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
Loading…
Add table
Add a link
Reference in a new issue