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
|
@ -0,0 +1,61 @@
|
|||
package com.adins.mss.foundation.camerainapp;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
|
||||
import com.adins.mss.foundation.camerainapp.helper.Logger;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 7/26/2016.
|
||||
*/
|
||||
public class CameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
|
||||
|
||||
private Context mContext;
|
||||
private SurfaceHolder mSurfaceHolder;
|
||||
private CameraPresenter presenter;
|
||||
|
||||
public CameraSurfaceView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
// TODO Auto-generated constructor stub
|
||||
mContext = context;
|
||||
mSurfaceHolder = getHolder();
|
||||
mSurfaceHolder.setFormat(PixelFormat.TRANSPARENT);
|
||||
mSurfaceHolder.addCallback(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceCreated(SurfaceHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
Logger.i(this, "surfaceCreated...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceChanged(SurfaceHolder holder, int format, int width,
|
||||
int height) {
|
||||
// TODO Auto-generated method stub
|
||||
Logger.i(this, "surfaceChanged...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceDestroyed(SurfaceHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
Logger.i(this, "surfaceDestroyed...");
|
||||
//CameraInterface.getInstance().doStopCamera();
|
||||
|
||||
if (presenter != null) {
|
||||
presenter.stopCamera();
|
||||
}
|
||||
}
|
||||
|
||||
public void setPresenter(CameraPresenter presenter) {
|
||||
this.presenter = presenter;
|
||||
}
|
||||
|
||||
public SurfaceHolder getSurfaceHolder() {
|
||||
return mSurfaceHolder;
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,40 @@
|
|||
package com.adins.mss.base.dynamicform.form.models;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by gigin.ginanjar on 11/10/2016.
|
||||
*/
|
||||
|
||||
public class Parameter {
|
||||
@SerializedName("refId")
|
||||
private String refId;
|
||||
@SerializedName("flag")
|
||||
private String flag;
|
||||
@SerializedName("answer")
|
||||
private String answer;
|
||||
|
||||
public String getRefId() {
|
||||
return refId;
|
||||
}
|
||||
|
||||
public void setRefId(String refId) {
|
||||
this.refId = refId;
|
||||
}
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getAnswer() {
|
||||
return answer;
|
||||
}
|
||||
|
||||
public void setAnswer(String answer) {
|
||||
this.answer = answer;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.adins.mss.base.todolist;
|
||||
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RequestQuestionSetBean extends MssRequestType {
|
||||
@SerializedName("formId")
|
||||
String formId;
|
||||
|
||||
public String getFormId() {
|
||||
return formId;
|
||||
}
|
||||
|
||||
public void setFormId(String formId) {
|
||||
this.formId = formId;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="MergeRootFrame"
|
||||
android:id="@+id/fab__header_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<View
|
||||
android:id="@+id/fab__gradient"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp" />
|
||||
|
||||
</FrameLayout>
|
|
@ -0,0 +1,91 @@
|
|||
package com.adins.mss.base.loyalti.barchart;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
|
||||
import com.adins.mss.base.loyalti.model.RankDetail;
|
||||
|
||||
import com.github.mikephil.charting.buffer.BarBuffer;
|
||||
import com.github.mikephil.charting.charts.BarChart;
|
||||
import com.github.mikephil.charting.data.BarEntry;
|
||||
import com.github.mikephil.charting.interfaces.datasets.IBarDataSet;
|
||||
import com.github.mikephil.charting.renderer.BarChartRenderer;
|
||||
|
||||
public class LoyaltyBarChartRenderer extends BarChartRenderer {
|
||||
|
||||
private RankDetail[][] rankDataSet;
|
||||
private Paint textPaint;
|
||||
private float textSizeMultiplier;
|
||||
private float textOffset;
|
||||
|
||||
public LoyaltyBarChartRenderer(BarChart chart, RankDetail[][] rankDataSet, float textSizeMultiplier, float textOffset) {
|
||||
super(chart, chart.getAnimator(), chart.getViewPortHandler());
|
||||
this.rankDataSet = rankDataSet;
|
||||
this.textPaint = new Paint();
|
||||
this.textSizeMultiplier = textSizeMultiplier;
|
||||
this.textOffset = textOffset;
|
||||
textPaint.setColor(Color.BLACK);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawDataSet(Canvas c, IBarDataSet dataSet, int index) {
|
||||
super.drawDataSet(c, dataSet, index);//draw default bar dimulai dari index x = 0
|
||||
drawRanksText(c,dataSet,index);//tambah draw rank disini
|
||||
}
|
||||
|
||||
private void drawRanksText(Canvas canvas,IBarDataSet dataSet,int index){
|
||||
BarBuffer buffer = mBarBuffers[index];
|
||||
|
||||
float left;//simpan pos kiri bar
|
||||
float right;//simpan pos kanan bar
|
||||
float bottom;//simpan pos bawah bar
|
||||
float offsetLeft;
|
||||
float marginPerRank;
|
||||
int stackLength;
|
||||
|
||||
for (int j = 0; j < buffer.buffer.length * mAnimator.getPhaseX(); j += (4*stackLength)) {
|
||||
if(rankDataSet == null || index >= rankDataSet.length)
|
||||
break;
|
||||
|
||||
stackLength = getStackLength(dataSet,index);//dapatkan length stack bar di xAxis=index untuk menentukan nilai buffer j selanjutnya.
|
||||
if(stackLength == 0)
|
||||
break;
|
||||
|
||||
left = buffer.buffer[j];
|
||||
right = buffer.buffer[j + 2];
|
||||
bottom = buffer.buffer[j + 3];
|
||||
|
||||
float x = (left + right) / 2f;
|
||||
float barWidth = right-left;
|
||||
if (!mViewPortHandler.isInBoundsRight(x) || !mViewPortHandler.isInBoundsLeft(x)){//render rank dimulai dari nilai coordinate(pixel) x bar yang terlihat di viewport
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
textPaint.setTextSize(barWidth * textSizeMultiplier);
|
||||
marginPerRank = textPaint.getTextSize();
|
||||
offsetLeft = barWidth + textOffset;
|
||||
|
||||
//draw ranks text from bottom to top of bar
|
||||
for (int r=0; r<rankDataSet[index].length; r++) {
|
||||
drawText(rankDataSet[index][r],canvas,x-offsetLeft,bottom - ((r+1)*marginPerRank) - (r*textPaint.getTextSize()));
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
}
|
||||
|
||||
private int getStackLength(IBarDataSet dataSet, int xIndex){
|
||||
if(xIndex > dataSet.getXMax()){
|
||||
return 0;
|
||||
}
|
||||
BarEntry entry = dataSet.getEntryForIndex(xIndex);
|
||||
return entry.getYVals().length;//dapatkan length stack untuk index bar berikutnya
|
||||
}
|
||||
|
||||
private void drawText(RankDetail rankData,Canvas c,float x, float y){
|
||||
textPaint.setColor(rankData.colorValue);
|
||||
c.drawText(String.valueOf(rankData.rank),x,y,textPaint);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- the theme applied to the application or activity -->
|
||||
<style name="CustomTheme"
|
||||
parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/gradient_end</item>
|
||||
<item name="colorPrimaryDark">@color/login_color</item>
|
||||
<item name="colorAccent">@color/gradient_end</item>
|
||||
<item name="android:actionBarStyle">@style/MyActionBar</item>
|
||||
<item name="android:popupMenuStyle">@style/PopupMenu</item>
|
||||
<item name="android:editTextStyle">@style/MyEditText</item>
|
||||
<item name="android:textViewStyle">@style/MyTextView</item>
|
||||
<!--<item name="android:buttonStyle">@style/MyButton</item>-->
|
||||
<item name="android:spinnerStyle">@style/MySpinner</item>
|
||||
<item name="android:actionBarTabStyle">@style/MyActionBarTab</item>
|
||||
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
|
||||
<item name="ptrHeaderStyle">@style/PtrHeader</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="PtrHeader" parent="@android:style/Widget">
|
||||
<item name="ptrHeaderBackground">@drawable/actionbar_background</item>
|
||||
<!-- This is commented out as you should not set this unless you know what you're doing -->
|
||||
<!-- <item name="ptrHeaderHeight"></item> -->
|
||||
|
||||
<item name="ptrHeaderTitleTextAppearance">@style/TextAppearance.Custom.PtrHeader.Title</item>
|
||||
<item name="ptrProgressBarStyle">inside</item>
|
||||
<item name="ptrProgressBarColor">@android:color/holo_green_light</item>
|
||||
|
||||
<item name="ptrPullText">Pull to Refresh</item>
|
||||
<item name="ptrRefreshingText">Loading ...</item>
|
||||
<item name="ptrReleaseText">Let go if you want me to refresh!</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Custom.PtrHeader.Title"
|
||||
parent="android:TextAppearance.Large.Inverse">
|
||||
<item name="android:textSize">20dp</item>
|
||||
</style>
|
||||
|
||||
<!-- ActionBar styles -->
|
||||
<style name="MyActionBar"
|
||||
parent="Widget.AppCompat.ActionBar">
|
||||
<item name="android:background">@drawable/actionbar_background</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:actionModeSplitBackground">@drawable/button_background</item>
|
||||
</style>
|
||||
|
||||
<!-- ActionBar styles -->
|
||||
<style name="MyActionBarTab"
|
||||
parent="Widget.AppCompat.ActionBar.TabView">
|
||||
<item name="android:background">@drawable/actionbar_tabindicator</item>
|
||||
<item name="android:showDividers">none</item>
|
||||
</style>
|
||||
|
||||
<style name="MyActionBarTabText" parent="Widget.AppCompat.ActionBar">
|
||||
<item name="android:textColor">#ffffff</item>
|
||||
</style>
|
||||
|
||||
<!-- Popup styles -->
|
||||
<style name="PopupMenu"
|
||||
parent="Widget.AppCompat.PopupMenu">
|
||||
<item name="android:popupBackground">@android:color/white</item>
|
||||
<item name="android:textColor">@color/tv_darker</item>
|
||||
<item name="android:showDividers">middle|beginning|end</item>
|
||||
</style>
|
||||
|
||||
<!-- Edittext styles -->
|
||||
<style name="MyEditText"
|
||||
parent="Widget.AppCompat.EditText">
|
||||
<item name="android:textColor">@color/tv_darker</item>
|
||||
<item name="android:minHeight">40dp</item>
|
||||
<item name="android:textColorHint">@color/shadowColor</item>
|
||||
</style>
|
||||
|
||||
<!-- Button styles -->
|
||||
<style name="MyButton"
|
||||
parent="@android:style/Widget.Button">
|
||||
<item name="android:background">@drawable/button_background</item>
|
||||
<item name="android:textColor">@color/tv_white</item>
|
||||
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
|
||||
</style>
|
||||
|
||||
<!-- Text View styles -->
|
||||
<style name="MyTextView"
|
||||
parent="Widget.AppCompat.TextView.SpinnerItem">
|
||||
<item name="android:textColor">@color/tv_darker</item>
|
||||
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
|
||||
</style>
|
||||
|
||||
<!-- Spinner styles -->
|
||||
<style name="MySpinner"
|
||||
parent="Widget.AppCompat.Spinner">
|
||||
<item name="android:background">@color/fontColorWhite</item>
|
||||
<item name="android:popupBackground">@color/fontColorWhite</item>
|
||||
<item name="android:padding">3dp</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomTheme.TranslucentActionBar">
|
||||
<item name="android:actionBarStyle">@style/Widget.ActionBar.Transparent</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomTheme.Light.TranslucentActionBar" parent="Theme.AppCompat.Light">
|
||||
<item name="android:actionBarStyle">@style/Widget.Light.ActionBar.Transparent</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,18 @@
|
|||
package com.adins.mss.base.todolist;
|
||||
|
||||
import com.adins.mss.dao.TaskH;
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class JsonOneTask extends MssResponseType {
|
||||
@SerializedName("taskH")
|
||||
private TaskH taskH;
|
||||
|
||||
public TaskH getOneTaskH() {
|
||||
return taskH;
|
||||
}
|
||||
|
||||
public void setOneTaskH(TaskH OneTaskH) {
|
||||
this.taskH = OneTaskH;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.adins.mss.foundation.sync.api.model;
|
||||
|
||||
/**
|
||||
* Created by gigin.ginanjar on 23/03/2016.
|
||||
*/
|
||||
public class SynchronizeRequestModelWithConstraint extends SynchronizeRequestModel {
|
||||
public String constraint1;
|
||||
public String constraint2;
|
||||
public String constraint3;
|
||||
public String constraint4;
|
||||
public String constraint5;
|
||||
|
||||
public String getConstraint1() {
|
||||
return constraint1;
|
||||
}
|
||||
|
||||
public void setConstraint1(String constraint1) {
|
||||
this.constraint1 = constraint1;
|
||||
}
|
||||
|
||||
public String getConstraint2() {
|
||||
return constraint2;
|
||||
}
|
||||
|
||||
public void setConstraint2(String constraint2) {
|
||||
this.constraint2 = constraint2;
|
||||
}
|
||||
|
||||
public String getConstraint3() {
|
||||
return constraint3;
|
||||
}
|
||||
|
||||
public void setConstraint3(String constraint3) {
|
||||
this.constraint3 = constraint3;
|
||||
}
|
||||
|
||||
public String getConstraint4() {
|
||||
return constraint4;
|
||||
}
|
||||
|
||||
public void setConstraint4(String constraint4) {
|
||||
this.constraint4 = constraint4;
|
||||
}
|
||||
|
||||
public String getConstraint5() {
|
||||
return constraint5;
|
||||
}
|
||||
|
||||
public void setConstraint5(String constraint5) {
|
||||
this.constraint5 = constraint5;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.adins.mss.odr;
|
||||
|
||||
import com.adins.mss.dao.MobileContentH;
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JsonRequestNews extends MssRequestType{
|
||||
|
||||
@SerializedName("uuid_mobile_content_h")
|
||||
String uuid_mobile_content_h;
|
||||
@SerializedName("listContentHeader")
|
||||
List<MobileContentH> listContentHeader;
|
||||
|
||||
public List<MobileContentH> getListContentHeader() {
|
||||
return listContentHeader;
|
||||
}
|
||||
public void setListContentHeader(List<MobileContentH> listContentHeader) {
|
||||
this.listContentHeader = listContentHeader;
|
||||
}
|
||||
public String getuuid_mobile_content_h(){
|
||||
return uuid_mobile_content_h;
|
||||
}
|
||||
public void setuuid_mobile_content_h(String uuid_mobile_content_h){
|
||||
this.uuid_mobile_content_h = uuid_mobile_content_h;
|
||||
}
|
||||
// public class ContentHeader extends ContentHeaderBean{
|
||||
// public ContentHeader(MobileContentH contentH){
|
||||
// super(contentH);
|
||||
// }
|
||||
// }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue