mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-30 21:04:16 +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: 3 KiB |
|
@ -0,0 +1,18 @@
|
|||
package com.adins.mss.base.dynamicform;
|
||||
|
||||
import com.adins.mss.dao.TaskH;
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class JsonRequestOpenStartTask extends MssRequestType {
|
||||
@SerializedName("taskH")
|
||||
TaskH taskH;
|
||||
|
||||
public TaskH getTaskH() {
|
||||
return this.taskH;
|
||||
}
|
||||
|
||||
public void setTaskH(TaskH value) {
|
||||
this.taskH = value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
package com.adins.mss.coll.fragments;
|
||||
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DetailKompetisiResponse extends MssResponseType {
|
||||
|
||||
@SerializedName("resultList")
|
||||
public ArrayList<MemberShipData> resultList;
|
||||
|
||||
public ArrayList<MemberShipData> getResultList() {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public void setResultList(ArrayList<MemberShipData> resultList) {
|
||||
this.resultList = resultList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MemberShipData {
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_CODE() {
|
||||
return MEMBERSHIP_PROGRAM_CODE;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_CODE(String MEMBERSHIP_PROGRAM_CODE) {
|
||||
this.MEMBERSHIP_PROGRAM_CODE = MEMBERSHIP_PROGRAM_CODE;
|
||||
}
|
||||
|
||||
public String getINFORMATION_TYPE() {
|
||||
return INFORMATION_TYPE;
|
||||
}
|
||||
|
||||
public void setINFORMATION_TYPE(String INFORMATION_TYPE) {
|
||||
this.INFORMATION_TYPE = INFORMATION_TYPE;
|
||||
}
|
||||
|
||||
public ArrayList<TeamMember> getTEAM_MEMBER() {
|
||||
return TEAM_MEMBER;
|
||||
}
|
||||
|
||||
public void setTEAM_MEMBER(ArrayList<TeamMember> TEAM_MEMBER) {
|
||||
this.TEAM_MEMBER = TEAM_MEMBER;
|
||||
}
|
||||
public String getLOGO() {
|
||||
return LOGO;
|
||||
}
|
||||
|
||||
public void setLOGO(String LOGO) {
|
||||
this.LOGO = LOGO;
|
||||
}
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_CODE")
|
||||
protected String MEMBERSHIP_PROGRAM_CODE;
|
||||
|
||||
@SerializedName("INFORMATION_TYPE")
|
||||
protected String INFORMATION_TYPE;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_NAME")
|
||||
protected String MEMBERSHIP_PROGRAM_NAME;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_DESCRIPTION")
|
||||
protected String MEMBERSHIP_PROGRAM_DESCRIPTION;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_STATUS")
|
||||
protected String MEMBERSHIP_PROGRAM_STATUS;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_START_DATE")
|
||||
protected String MEMBERSHIP_PROGRAM_START_DATE;
|
||||
|
||||
@SerializedName("GRACE_PERIODE")
|
||||
protected String GRACE_PERIODE;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_EXPIRED_DATE")
|
||||
protected String MEMBERSHIP_PROGRAM_EXPIRED_DATE;
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_NAME() {
|
||||
return MEMBERSHIP_PROGRAM_NAME;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_NAME(String MEMBERSHIP_PROGRAM_NAME) {
|
||||
this.MEMBERSHIP_PROGRAM_NAME = MEMBERSHIP_PROGRAM_NAME;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_DESCRIPTION() {
|
||||
return MEMBERSHIP_PROGRAM_DESCRIPTION;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_DESCRIPTION(String MEMBERSHIP_PROGRAM_DESCRIPTION) {
|
||||
this.MEMBERSHIP_PROGRAM_DESCRIPTION = MEMBERSHIP_PROGRAM_DESCRIPTION;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_STATUS() {
|
||||
return MEMBERSHIP_PROGRAM_STATUS;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_STATUS(String MEMBERSHIP_PROGRAM_STATUS) {
|
||||
this.MEMBERSHIP_PROGRAM_STATUS = MEMBERSHIP_PROGRAM_STATUS;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_START_DATE() {
|
||||
return MEMBERSHIP_PROGRAM_START_DATE;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_START_DATE(String MEMBERSHIP_PROGRAM_START_DATE) {
|
||||
this.MEMBERSHIP_PROGRAM_START_DATE = MEMBERSHIP_PROGRAM_START_DATE;
|
||||
}
|
||||
|
||||
public String getGRACE_PERIODE() {
|
||||
return GRACE_PERIODE;
|
||||
}
|
||||
|
||||
public void setGRACE_PERIODE(String GRACE_PERIODE) {
|
||||
this.GRACE_PERIODE = GRACE_PERIODE;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_EXPIRED_DATE() {
|
||||
return MEMBERSHIP_PROGRAM_EXPIRED_DATE;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_EXPIRED_DATE(String MEMBERSHIP_PROGRAM_EXPIRED_DATE) {
|
||||
this.MEMBERSHIP_PROGRAM_EXPIRED_DATE = MEMBERSHIP_PROGRAM_EXPIRED_DATE;
|
||||
}
|
||||
|
||||
@SerializedName("TEAM_MEMBER")
|
||||
protected ArrayList<TeamMember> TEAM_MEMBER;
|
||||
|
||||
|
||||
@SerializedName("LOGO")
|
||||
protected String LOGO;
|
||||
|
||||
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,121 @@
|
|||
package com.adins.mss.odr.catalogue.api;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.AsyncTask;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.NewMainActivity;
|
||||
import com.adins.mss.base.util.GsonHelper;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.Catalogue;
|
||||
import com.adins.mss.foundation.db.dataaccess.CatalogueDataAccess;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.adins.mss.foundation.formatter.Tool;
|
||||
import com.adins.mss.foundation.http.HttpConnectionResult;
|
||||
import com.adins.mss.foundation.http.HttpCryptedConnection;
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.adins.mss.odr.R;
|
||||
import com.adins.mss.odr.catalogue.FragmentPromotion;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by olivia.dg on 11/28/2017.
|
||||
*/
|
||||
|
||||
public class GetCatalogue extends AsyncTask<Void, Void, List<Catalogue>> {
|
||||
private FragmentActivity activity;
|
||||
private ProgressDialog progressDialog;
|
||||
private String errMessage;
|
||||
private List<Catalogue> result = new ArrayList<Catalogue>();
|
||||
|
||||
public GetCatalogue(FragmentActivity activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
super.onPreExecute();
|
||||
progressDialog = ProgressDialog.show(activity, "", activity.getString(R.string.contact_server), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Catalogue> doInBackground(Void... params) {
|
||||
if (Tool.isInternetconnected(activity)) {
|
||||
MssRequestType request = new MssRequestType();
|
||||
request.setAudit(GlobalData.getSharedGlobalData().getAuditData());
|
||||
|
||||
String json = GsonHelper.toJson(request);
|
||||
|
||||
String url = GlobalData.getSharedGlobalData().getURL_GET_CATALOGUE_HEADER();
|
||||
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
|
||||
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
|
||||
HttpCryptedConnection httpConn = new HttpCryptedConnection(activity, encrypt, decrypt);
|
||||
HttpConnectionResult serverResult = null;
|
||||
try {
|
||||
serverResult = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
GetCatalogueResponse response = null;
|
||||
if (serverResult != null && serverResult.isOK()) {
|
||||
try {
|
||||
String responseBody = serverResult.getResult();
|
||||
response = GsonHelper.fromJson(responseBody, GetCatalogueResponse.class);
|
||||
} catch (Exception e) {
|
||||
if(Global.IS_DEV) {
|
||||
e.printStackTrace();
|
||||
errMessage=e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
List<Catalogue> list = response.getListProductCatalogue();
|
||||
if (list != null && list.size() != 0) {
|
||||
result = list;
|
||||
CatalogueDataAccess.addOrReplace(activity, list);
|
||||
} else {
|
||||
errMessage = activity.getString(R.string.no_data_from_server);
|
||||
}
|
||||
} else {
|
||||
errMessage = activity.getString(R.string.server_down);
|
||||
}
|
||||
} else {
|
||||
errMessage = activity.getString(R.string.no_internet_connection);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(List<Catalogue> result) {
|
||||
super.onPostExecute(result);
|
||||
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
|
||||
if (errMessage != null) {
|
||||
if (errMessage.equals(activity.getString(R.string.no_data_from_server))) {
|
||||
NiftyDialogBuilder builder = NiftyDialogBuilder.getInstance(activity);
|
||||
builder.withTitle("INFO")
|
||||
.withMessage(errMessage)
|
||||
.show();
|
||||
} else {
|
||||
Toast.makeText(activity, errMessage, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
Fragment fragment = new FragmentPromotion();
|
||||
|
||||
FragmentTransaction transaction = NewMainActivity.fragmentManager.beginTransaction();
|
||||
transaction.setCustomAnimations(R.anim.activity_open_translate,R.anim.activity_close_scale,R.anim.activity_open_scale,R.anim.activity_close_translate);
|
||||
transaction.replace(R.id.content_frame, fragment);
|
||||
transaction.addToBackStack(null);
|
||||
transaction.commit();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.adins.mss.svy;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.content.Context;
|
||||
|
||||
import com.adins.mss.base.dialogfragments.NewTaskDialog;
|
||||
import com.adins.mss.base.todo.form.NewTaskActivity;
|
||||
import com.adins.mss.base.todo.form.NewTaskAdapter;
|
||||
import com.adins.mss.base.todolist.DoList;
|
||||
import com.adins.mss.dao.Scheme;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MSNewTaskActivity extends NewTaskDialog {
|
||||
|
||||
private DoList list;
|
||||
private List<Scheme> objects;
|
||||
|
||||
@Override
|
||||
public void onAttach(Context activity) {
|
||||
super.onAttach(activity);
|
||||
// getActivity().getActionBar().setTitle(getString(R.string.title_mn_newtask));
|
||||
// getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NewTaskAdapter getNewTaskAdapter() {
|
||||
// TODO Auto-generated method stub
|
||||
list = new DoList(getActivity());
|
||||
objects = list.getSurveyListScheme();
|
||||
|
||||
return new NewTaskAdapter(getActivity(), objects);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
package com.manuelpeinado.fadingactionbar.view;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.webkit.WebView;
|
||||
|
||||
/**
|
||||
* Adapted from: http://stackoverflow.com/a/14753235/244576 and http://stackoverflow.com/a/11442374/244576
|
||||
*/
|
||||
public class ObservableWebViewWithHeader extends WebView implements ObservableScrollable {
|
||||
private OnScrollChangedCallback mOnScrollChangedCallback;
|
||||
/*
|
||||
* Header
|
||||
*/
|
||||
private int headerHeight;
|
||||
private boolean touchInHeader;
|
||||
|
||||
public ObservableWebViewWithHeader(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public ObservableWebViewWithHeader(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public ObservableWebViewWithHeader(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
// determine height of title bar
|
||||
View title = getChildAt(0);
|
||||
headerHeight = title == null ? 0 : title.getMeasuredHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
return true; // don't pass our touch events to children (title bar), we send these in dispatchTouchEvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent me) {
|
||||
|
||||
boolean wasInTitle = false;
|
||||
switch (me.getActionMasked()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
touchInHeader = (me.getY() <= visibleHeaderHeight());
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
wasInTitle = touchInHeader;
|
||||
touchInHeader = false;
|
||||
break;
|
||||
}
|
||||
if (touchInHeader || wasInTitle) {
|
||||
View title = getChildAt(0);
|
||||
if (title != null) {
|
||||
// this touch belongs to title bar, dispatch it here
|
||||
me.offsetLocation(0, getScrollY());
|
||||
return title.dispatchTouchEvent(me);
|
||||
}
|
||||
}
|
||||
// this is our touch, offset and process
|
||||
me.offsetLocation(0, -headerHeight);
|
||||
return super.dispatchTouchEvent(me);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return visible height of title (may return negative values)
|
||||
*/
|
||||
private int visibleHeaderHeight() {
|
||||
return headerHeight - getScrollY();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas c) {
|
||||
c.save();
|
||||
int tH = visibleHeaderHeight();
|
||||
if (tH > 0) {
|
||||
// clip so that it doesn't clear background under title bar
|
||||
int sx = getScrollX(), sy = getScrollY();
|
||||
c.clipRect(sx, sy + tH, sx + getWidth(), sy + getHeight());
|
||||
}
|
||||
c.translate(0, headerHeight);
|
||||
super.onDraw(c);
|
||||
c.restore();
|
||||
}
|
||||
|
||||
/*
|
||||
* Scroll
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
|
||||
super.onScrollChanged(l, t, oldl, oldt);
|
||||
|
||||
View title = getChildAt(0);
|
||||
if (title != null) // undo horizontal scroll, so that title scrolls only vertically
|
||||
title.offsetLeftAndRight(l - title.getLeft());
|
||||
|
||||
if (mOnScrollChangedCallback != null)
|
||||
mOnScrollChangedCallback.onScroll(l, t);
|
||||
}
|
||||
|
||||
public OnScrollChangedCallback getOnScrollChangedCallback() {
|
||||
return mOnScrollChangedCallback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnScrollChangedCallback(OnScrollChangedCallback callback) {
|
||||
mOnScrollChangedCallback = callback;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.adins.libs.nineoldandroids.animation;
|
||||
|
||||
/**
|
||||
* Interface for use with the {@link ValueAnimator#setEvaluator(TypeEvaluator)} function. Evaluators
|
||||
* allow developers to create animations on arbitrary property types, by allowing them to supply
|
||||
* custom evaulators for types that are not automatically understood and used by the animation
|
||||
* system.
|
||||
*
|
||||
* @see ValueAnimator#setEvaluator(TypeEvaluator)
|
||||
*/
|
||||
public interface TypeEvaluator<T> {
|
||||
|
||||
/**
|
||||
* This function returns the result of linearly interpolating the start and end values, with
|
||||
* <code>fraction</code> representing the proportion between the start and end values. The
|
||||
* calculation is a simple parametric calculation: <code>result = x0 + t * (v1 - v0)</code>,
|
||||
* where <code>x0</code> is <code>startValue</code>, <code>x1</code> is <code>endValue</code>,
|
||||
* and <code>t</code> is <code>fraction</code>.
|
||||
*
|
||||
* @param fraction The fraction from the starting to the ending values
|
||||
* @param startValue The start value.
|
||||
* @param endValue The end value.
|
||||
* @return A linear interpolation between the start and end values, given the
|
||||
* <code>fraction</code> parameter.
|
||||
*/
|
||||
public T evaluate(float fraction, T startValue, T endValue);
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/customTabTasklist"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tabTextTaskList"
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
|
||||
</LinearLayout>
|
Loading…
Add table
Add a link
Reference in a new issue