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
|
@ -0,0 +1,167 @@
|
|||
package com.adins.mss.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.adins.mss.dao.DaoSession;
|
||||
import de.greenrobot.dao.DaoException;
|
||||
|
||||
import com.adins.mss.base.util.ExcludeFromGson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
|
||||
/**
|
||||
* Entity mapped to table "MS_TIMELINETYPE".
|
||||
*/
|
||||
public class TimelineType {
|
||||
|
||||
/** Not-null value. */
|
||||
@SerializedName("uuid_timeline_type")
|
||||
private String uuid_timeline_type;
|
||||
@SerializedName("timeline_description")
|
||||
private String timeline_description;
|
||||
@SerializedName("timeline_type")
|
||||
private String timeline_type;
|
||||
@SerializedName("usr_crt")
|
||||
private String usr_crt;
|
||||
@SerializedName("dtm_crt")
|
||||
private java.util.Date dtm_crt;
|
||||
@SerializedName("usr_upd")
|
||||
private String usr_upd;
|
||||
@SerializedName("dtm_upd")
|
||||
private java.util.Date dtm_upd;
|
||||
|
||||
/** Used to resolve relations */
|
||||
private transient DaoSession daoSession;
|
||||
|
||||
/** Used for active entity operations. */
|
||||
private transient TimelineTypeDao myDao;
|
||||
|
||||
private List<Timeline> timelineList;
|
||||
|
||||
public TimelineType() {
|
||||
}
|
||||
|
||||
public TimelineType(String uuid_timeline_type) {
|
||||
this.uuid_timeline_type = uuid_timeline_type;
|
||||
}
|
||||
|
||||
public TimelineType(String uuid_timeline_type, String timeline_description, String timeline_type, String usr_crt, java.util.Date dtm_crt, String usr_upd, java.util.Date dtm_upd) {
|
||||
this.uuid_timeline_type = uuid_timeline_type;
|
||||
this.timeline_description = timeline_description;
|
||||
this.timeline_type = timeline_type;
|
||||
this.usr_crt = usr_crt;
|
||||
this.dtm_crt = dtm_crt;
|
||||
this.usr_upd = usr_upd;
|
||||
this.dtm_upd = dtm_upd;
|
||||
}
|
||||
|
||||
/** called by internal mechanisms, do not call yourself. */
|
||||
public void __setDaoSession(DaoSession daoSession) {
|
||||
this.daoSession = daoSession;
|
||||
myDao = daoSession != null ? daoSession.getTimelineTypeDao() : null;
|
||||
}
|
||||
|
||||
/** Not-null value. */
|
||||
public String getUuid_timeline_type() {
|
||||
return uuid_timeline_type;
|
||||
}
|
||||
|
||||
/** Not-null value; ensure this value is available before it is saved to the database. */
|
||||
public void setUuid_timeline_type(String uuid_timeline_type) {
|
||||
this.uuid_timeline_type = uuid_timeline_type;
|
||||
}
|
||||
|
||||
public String getTimeline_description() {
|
||||
return timeline_description;
|
||||
}
|
||||
|
||||
public void setTimeline_description(String timeline_description) {
|
||||
this.timeline_description = timeline_description;
|
||||
}
|
||||
|
||||
public String getTimeline_type() {
|
||||
return timeline_type;
|
||||
}
|
||||
|
||||
public void setTimeline_type(String timeline_type) {
|
||||
this.timeline_type = timeline_type;
|
||||
}
|
||||
|
||||
public String getUsr_crt() {
|
||||
return usr_crt;
|
||||
}
|
||||
|
||||
public void setUsr_crt(String usr_crt) {
|
||||
this.usr_crt = usr_crt;
|
||||
}
|
||||
|
||||
public java.util.Date getDtm_crt() {
|
||||
return dtm_crt;
|
||||
}
|
||||
|
||||
public void setDtm_crt(java.util.Date dtm_crt) {
|
||||
this.dtm_crt = dtm_crt;
|
||||
}
|
||||
|
||||
public String getUsr_upd() {
|
||||
return usr_upd;
|
||||
}
|
||||
|
||||
public void setUsr_upd(String usr_upd) {
|
||||
this.usr_upd = usr_upd;
|
||||
}
|
||||
|
||||
public java.util.Date getDtm_upd() {
|
||||
return dtm_upd;
|
||||
}
|
||||
|
||||
public void setDtm_upd(java.util.Date dtm_upd) {
|
||||
this.dtm_upd = dtm_upd;
|
||||
}
|
||||
|
||||
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
|
||||
public List<Timeline> getTimelineList() {
|
||||
if (timelineList == null) {
|
||||
if (daoSession == null) {
|
||||
throw new DaoException("Entity is detached from DAO context");
|
||||
}
|
||||
TimelineDao targetDao = daoSession.getTimelineDao();
|
||||
List<Timeline> timelineListNew = targetDao._queryTimelineType_TimelineList(uuid_timeline_type);
|
||||
synchronized (this) {
|
||||
if(timelineList == null) {
|
||||
timelineList = timelineListNew;
|
||||
}
|
||||
}
|
||||
}
|
||||
return timelineList;
|
||||
}
|
||||
|
||||
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
|
||||
public synchronized void resetTimelineList() {
|
||||
timelineList = null;
|
||||
}
|
||||
|
||||
/** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
|
||||
public void delete() {
|
||||
if (myDao == null) {
|
||||
throw new DaoException("Entity is detached from DAO context");
|
||||
}
|
||||
myDao.delete(this);
|
||||
}
|
||||
|
||||
/** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
|
||||
public void update() {
|
||||
if (myDao == null) {
|
||||
throw new DaoException("Entity is detached from DAO context");
|
||||
}
|
||||
myDao.update(this);
|
||||
}
|
||||
|
||||
/** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
|
||||
public void refresh() {
|
||||
if (myDao == null) {
|
||||
throw new DaoException("Entity is detached from DAO context");
|
||||
}
|
||||
myDao.refresh(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.adins.mss.coll.loyalti.barchart;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
|
||||
import com.github.mikephil.charting.components.IMarker;
|
||||
import com.github.mikephil.charting.data.BarEntry;
|
||||
import com.github.mikephil.charting.data.Entry;
|
||||
import com.github.mikephil.charting.highlight.Highlight;
|
||||
import com.github.mikephil.charting.utils.MPPointF;
|
||||
|
||||
public class PointClickMarker implements IMarker {
|
||||
|
||||
private Entry currClickEntry;
|
||||
private Highlight highlight;
|
||||
private Paint textPaint;
|
||||
private float textOffset;
|
||||
|
||||
private float textSize;
|
||||
|
||||
public PointClickMarker(float textSize, float textOffset) {
|
||||
this.textSize = textSize;
|
||||
this.textOffset = textOffset;
|
||||
textPaint = new Paint();
|
||||
textPaint.setTextSize(textSize);
|
||||
textPaint.setColor(Color.WHITE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MPPointF getOffset() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MPPointF getOffsetForDrawingAtPoint(float posX, float posY) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshContent(Entry e, Highlight highlight) {
|
||||
currClickEntry = e;
|
||||
this.highlight = highlight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas, float posX, float posY) {
|
||||
if(currClickEntry == null)
|
||||
return;
|
||||
if(highlight == null)
|
||||
return;
|
||||
|
||||
int yVal = 0;
|
||||
if(highlight.isStacked()){
|
||||
int stackIdx = highlight.getStackIndex();
|
||||
BarEntry barEntry = (BarEntry) currClickEntry;
|
||||
yVal = (int)barEntry.getYVals()[stackIdx];
|
||||
}
|
||||
else {
|
||||
yVal = (int)currClickEntry.getY();
|
||||
}
|
||||
canvas.drawText(String.valueOf(yVal),posX - textPaint.getTextSize() + textOffset,posY + textPaint.getTextSize(),textPaint);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.soundcloud.android.crop.util;
|
||||
|
||||
public class Log {
|
||||
|
||||
private static final String TAG = "android-crop";
|
||||
|
||||
public static final void e(String msg) {
|
||||
android.util.Log.e(TAG, msg);
|
||||
}
|
||||
|
||||
public static final void e(String msg, Throwable e) {
|
||||
android.util.Log.e(TAG, msg, e);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (C) 2015 Paul Burke
|
||||
*
|
||||
* 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.mss.base.todolist.form.helper;
|
||||
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
|
||||
/**
|
||||
* Interface to notify an item ViewHolder of relevant callbacks from {@link
|
||||
* androidx.recyclerview.widget.ItemTouchHelper.Callback}.
|
||||
*
|
||||
* @author Paul Burke (ipaulpro)
|
||||
*/
|
||||
public interface ItemTouchHelperViewHolder {
|
||||
|
||||
/**
|
||||
* Called when the {@link ItemTouchHelper} first registers an item as being moved or swiped.
|
||||
* Implementations should update the item view to indicate it's active state.
|
||||
*/
|
||||
void onItemSelected();
|
||||
|
||||
|
||||
/**
|
||||
* Called when the {@link ItemTouchHelper} has completed the move or swipe, and the active item
|
||||
* state should be cleared.
|
||||
*/
|
||||
void onItemClear();
|
||||
}
|
|
@ -0,0 +1,346 @@
|
|||
package com.adins.mss.base.todolist.form;
|
||||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.NewMainActivity;
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
import com.adins.mss.base.dynamicform.CustomerFragment;
|
||||
import com.adins.mss.base.dynamicform.SurveyHeaderBean;
|
||||
import com.adins.mss.base.todolist.ToDoList;
|
||||
import com.adins.mss.base.todolist.form.todaysplan.TodayPlanHandler;
|
||||
import com.adins.mss.base.todolist.todayplanrepository.TodayPlanRepository;
|
||||
import com.adins.mss.base.util.Utility;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.LocationInfo;
|
||||
import com.adins.mss.dao.PlanTask;
|
||||
import com.adins.mss.dao.TaskH;
|
||||
import com.adins.mss.foundation.db.dataaccess.PlanTaskDataAccess;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.OnMapReadyCallback;
|
||||
import com.google.android.gms.maps.SupportMapFragment;
|
||||
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.android.gms.maps.model.LatLngBounds;
|
||||
import com.google.android.gms.maps.model.Marker;
|
||||
import com.google.android.gms.maps.model.MarkerOptions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link MapsViewerFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class MapsViewerFragment extends Fragment implements GoogleMap.OnInfoWindowClickListener, OnMapReadyCallback {
|
||||
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
private static View view;
|
||||
public List<TaskH> listTaskH;
|
||||
public LatLngBounds lngBounds;
|
||||
SupportMapFragment mapFragment;
|
||||
private GoogleMap mGoogleMap;
|
||||
private LatLng locationPoint;
|
||||
private HashMap<Marker, TaskH> taskHHashMap;
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
private TodayPlanHandler todayPlanHandler;//reference to view or fragment that handles today plan
|
||||
|
||||
public MapsViewerFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment MapsViewerFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static MapsViewerFragment newInstance(String param1, String param2) {
|
||||
MapsViewerFragment fragment = new MapsViewerFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public void setTodayPlanHandler(TodayPlanHandler todayPlanHandler) {
|
||||
this.todayPlanHandler = todayPlanHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
locationPoint = new LatLng(0d, 0d);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
if (view != null) {
|
||||
ViewGroup parent = (ViewGroup) view.getParent();
|
||||
if (parent != null)
|
||||
parent.removeView(view);
|
||||
}
|
||||
taskHHashMap = new LinkedHashMap<>();
|
||||
try {
|
||||
view = inflater.inflate(R.layout.maps_layout, container, false);
|
||||
getActivity().findViewById(R.id.spinner).setVisibility(View.GONE);
|
||||
getActivity().findViewById(R.id.search).setVisibility(View.GONE);
|
||||
getActivity().setTitle(getString(R.string.title_mn_map));
|
||||
initialize();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
initialize();
|
||||
}
|
||||
setHasOptionsMenu(true);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getActivity().findViewById(R.id.spinner).setVisibility(View.GONE);
|
||||
getActivity().findViewById(R.id.search).setVisibility(View.GONE);
|
||||
getActivity().setTitle(getString(R.string.title_mn_map));
|
||||
if (mGoogleMap != null)
|
||||
mGoogleMap.setOnInfoWindowClickListener(this);
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
if (mGoogleMap == null) {
|
||||
mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.maps);
|
||||
mapFragment.getMapAsync(this);
|
||||
if (mGoogleMap != null) {
|
||||
setupMaps();
|
||||
}
|
||||
}
|
||||
if (GlobalData.getSharedGlobalData().getUser() == null) {
|
||||
NewMainActivity.InitializeGlobalDataIfError(getActivity().getApplicationContext());
|
||||
}
|
||||
}
|
||||
|
||||
private void setupMaps() {
|
||||
try {
|
||||
LocationInfo info = Global.LTM.getCurrentLocation(Global.FLAG_LOCATION_CAMERA);
|
||||
double mLatitude = Double.parseDouble(info.getLatitude());
|
||||
double mLongitude = Double.parseDouble(info.getLongitude());
|
||||
locationPoint = new LatLng(mLatitude, mLongitude);
|
||||
MarkerOptions markerOptions = new MarkerOptions();
|
||||
markerOptions.position(locationPoint);
|
||||
markerOptions.title("Your Location");
|
||||
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));
|
||||
mGoogleMap.addMarker(markerOptions);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void showAddTaskPlanDialog(final TaskH taskH, final Marker marker){
|
||||
final NiftyDialogBuilder dialogBuilder = NiftyDialogBuilder.getInstance(getActivity());
|
||||
dialogBuilder.withTitle(getActivity().getString(R.string.info_capital))
|
||||
.withMessage(getString(R.string.add_customer_to_todays_plan, taskH.getCustomer_name()))
|
||||
.withButton1Text(getActivity().getString(R.string.btnYes))
|
||||
.withButton2Text(getActivity().getString(R.string.btnCancel))
|
||||
.setButton1Click(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
if(todayPlanHandler != null){
|
||||
List<TaskH> planTaskHs = new ArrayList<>();
|
||||
planTaskHs.add(taskH);
|
||||
try {
|
||||
todayPlanHandler.addToPlan(planTaskHs);
|
||||
marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
|
||||
}catch (Exception e){
|
||||
|
||||
dialogBuilder.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
dialogBuilder.dismiss();
|
||||
}
|
||||
})
|
||||
.setButton2Click(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialogBuilder.dismiss();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInfoWindowClick(Marker marker) {
|
||||
TaskH task = taskHHashMap.get(marker);
|
||||
if (task != null) {
|
||||
if(Global.PLAN_TASK_ENABLED){
|
||||
List<PlanTask> planTask = PlanTaskDataAccess.findPlanByTaskH(getActivity(),task.getUuid_task_h());
|
||||
if(planTask.size() == 0){
|
||||
showAddTaskPlanDialog(task, marker);
|
||||
return;
|
||||
}
|
||||
if(!Global.isPlanStarted()){
|
||||
Toast.makeText(getActivity(), getString(R.string.pls_start_visit), Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
NewMainActivity.fragmentManager.popBackStack();
|
||||
SurveyHeaderBean header = new SurveyHeaderBean(task);
|
||||
CustomerFragment fragment = CustomerFragment.create(header);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
Utility.freeMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
// menu.findItem(R.id.mnGuide).setVisible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(GoogleMap googleMap) {
|
||||
mGoogleMap = googleMap;
|
||||
setupMaps();
|
||||
List<TaskH> taskHList = ToDoList.getListTaskInPriority(getActivity(), ToDoList.SEARCH_BY_ALL, null);
|
||||
if (taskHList != null && taskHList.size() > 0) {
|
||||
|
||||
LatLngBounds.Builder bounds = new LatLngBounds.Builder();
|
||||
for (final TaskH task : taskHList) {
|
||||
try {
|
||||
double latitude = 0;
|
||||
double longitude = 0;
|
||||
boolean isTaskPlan = false;
|
||||
String sLatitude = task.getLatitude();
|
||||
String sLongitude = task.getLongitude();
|
||||
if (sLatitude != null && !sLatitude.equals("0.0") && !sLatitude.equals("null")) {
|
||||
latitude = Double.parseDouble(task.getLatitude());
|
||||
}
|
||||
if (sLongitude != null && !sLongitude.equals("0.0") && !sLongitude.equals("null")) {
|
||||
longitude = Double.parseDouble(task.getLongitude());
|
||||
}
|
||||
if (latitude != 0 || longitude != 0) {
|
||||
|
||||
//check if task is task plan
|
||||
if(Global.PLAN_TASK_ENABLED){
|
||||
TodayPlanRepository todayPlanRepo = GlobalData.getSharedGlobalData().getTodayPlanRepo();
|
||||
if(todayPlanRepo != null){
|
||||
PlanTask planTask = todayPlanRepo.getPlanTaskByTaskH(task.getTask_id());
|
||||
if(planTask != null)
|
||||
isTaskPlan = true;
|
||||
}
|
||||
}
|
||||
|
||||
LatLng latLng = new LatLng(latitude, longitude);//new LatLng(-6.195274, 106.778008);
|
||||
MarkerOptions markerOptions = new MarkerOptions();
|
||||
markerOptions.position(latLng);
|
||||
markerOptions.title(task.getCustomer_name());
|
||||
markerOptions.snippet(task.getCustomer_phone() + "\r\n" + task.getCustomer_address());
|
||||
if(isTaskPlan){
|
||||
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
|
||||
}
|
||||
else {
|
||||
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));
|
||||
}
|
||||
|
||||
bounds.include(latLng);
|
||||
Marker marker = mGoogleMap.addMarker(markerOptions);
|
||||
taskHHashMap.put(marker, task);
|
||||
mGoogleMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
|
||||
@Override
|
||||
public View getInfoWindow(Marker marker) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getInfoContents(Marker marker) {
|
||||
|
||||
View v = getActivity().getLayoutInflater().inflate(R.layout.marker, null);
|
||||
TextView infoTitle = (TextView) v.findViewById(R.id.infoTitle);
|
||||
infoTitle.setText(marker.getTitle());
|
||||
TextView infoSnippet = (TextView) v.findViewById(R.id.infoSnippet);
|
||||
infoSnippet.setText(marker.getSnippet());
|
||||
|
||||
return v;
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
|
||||
}
|
||||
}
|
||||
bounds.include(locationPoint);
|
||||
lngBounds = bounds.build();
|
||||
}
|
||||
final View view = mapFragment.getView();
|
||||
if (view.getViewTreeObserver().isAlive()) {
|
||||
view.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@SuppressWarnings("deprecation") // We use the new method when supported
|
||||
@SuppressLint("NewApi") // We check which build version we are using.
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
|
||||
view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
} else {
|
||||
view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
if (mGoogleMap != null) {
|
||||
try {
|
||||
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngBounds(lngBounds, 50));
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(locationPoint, 12));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
mGoogleMap.setOnInfoWindowClickListener(this);
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,39 @@
|
|||
package com.adins.mss.coll.models.loyaltymodels;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DocumentListDetail implements Serializable {
|
||||
@SerializedName("orderPosition")
|
||||
private String orderPosition;
|
||||
@SerializedName("namaDocument")
|
||||
private String namaDocument;
|
||||
@SerializedName("uuidGuideline")
|
||||
private String uuidGuideline;
|
||||
|
||||
// Getters and setters
|
||||
public String getOrderPosition() {
|
||||
return orderPosition;
|
||||
}
|
||||
|
||||
public void setOrderPosition(String orderPosition) {
|
||||
this.orderPosition = orderPosition;
|
||||
}
|
||||
|
||||
public String getNamaDocument() {
|
||||
return namaDocument;
|
||||
}
|
||||
|
||||
public void setNamaDocument(String namaDocument) {
|
||||
this.namaDocument = namaDocument;
|
||||
}
|
||||
|
||||
public String getUuidGuideline() {
|
||||
return uuidGuideline;
|
||||
}
|
||||
|
||||
public void setUuidGuideline(String uuidGuideline) {
|
||||
this.uuidGuideline = uuidGuideline;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
package com.mikepenz.aboutlibraries.entity;
|
||||
|
||||
public class Library implements Comparable<Library> {
|
||||
|
||||
private String definedName = "";
|
||||
|
||||
private boolean internal = false;
|
||||
|
||||
private String author = "";
|
||||
private String authorWebsite = "";
|
||||
private String libraryName = "";
|
||||
private String libraryDescription = "";
|
||||
private String libraryVersion = "";
|
||||
private String libraryWebsite = "";
|
||||
private License license;
|
||||
|
||||
private boolean isOpenSource = true;
|
||||
private String repositoryLink = "";
|
||||
|
||||
private String classPath = "";
|
||||
private int buildVersion;
|
||||
|
||||
public Library() {
|
||||
|
||||
}
|
||||
|
||||
public Library(String author, String libraryName, String libraryDescription) {
|
||||
this.author = author;
|
||||
this.libraryName = libraryName;
|
||||
this.libraryDescription = libraryDescription;
|
||||
}
|
||||
|
||||
public Library(String author, String libraryName, String libraryDescription, String libraryVersion) {
|
||||
this.author = author;
|
||||
this.libraryName = libraryName;
|
||||
this.libraryDescription = libraryDescription;
|
||||
this.libraryVersion = libraryVersion;
|
||||
}
|
||||
|
||||
public Library(String author, String libraryName, String libraryDescription, String libraryVersion, License license, int buildVersion) {
|
||||
this.author = author;
|
||||
this.libraryName = libraryName;
|
||||
this.libraryDescription = libraryDescription;
|
||||
this.libraryVersion = libraryVersion;
|
||||
this.license = license;
|
||||
this.buildVersion = buildVersion;
|
||||
}
|
||||
|
||||
public int getBuildVersion() {
|
||||
return buildVersion;
|
||||
}
|
||||
|
||||
public void setBuildVersion(int buildVersion) {
|
||||
this.buildVersion = buildVersion;
|
||||
}
|
||||
|
||||
public String getDefinedName() {
|
||||
return definedName;
|
||||
}
|
||||
|
||||
public void setDefinedName(String definedName) {
|
||||
this.definedName = definedName;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getAuthorWebsite() {
|
||||
return authorWebsite;
|
||||
}
|
||||
|
||||
public void setAuthorWebsite(String authorWebsite) {
|
||||
this.authorWebsite = authorWebsite;
|
||||
}
|
||||
|
||||
public String getLibraryName() {
|
||||
return libraryName;
|
||||
}
|
||||
|
||||
public void setLibraryName(String libraryName) {
|
||||
this.libraryName = libraryName;
|
||||
}
|
||||
|
||||
public String getLibraryDescription() {
|
||||
return libraryDescription;
|
||||
}
|
||||
|
||||
public void setLibraryDescription(String libraryDescription) {
|
||||
this.libraryDescription = libraryDescription;
|
||||
}
|
||||
|
||||
public String getLibraryVersion() {
|
||||
return libraryVersion;
|
||||
}
|
||||
|
||||
public void setLibraryVersion(String libraryVersion) {
|
||||
this.libraryVersion = libraryVersion;
|
||||
}
|
||||
|
||||
public String getLibraryWebsite() {
|
||||
return libraryWebsite;
|
||||
}
|
||||
|
||||
public void setLibraryWebsite(String libraryWebsite) {
|
||||
this.libraryWebsite = libraryWebsite;
|
||||
}
|
||||
|
||||
public License getLicense() {
|
||||
return license;
|
||||
}
|
||||
|
||||
public void setLicense(License license) {
|
||||
this.license = license;
|
||||
}
|
||||
|
||||
public boolean isOpenSource() {
|
||||
return isOpenSource;
|
||||
}
|
||||
|
||||
public void setOpenSource(boolean isOpenSource) {
|
||||
this.isOpenSource = isOpenSource;
|
||||
}
|
||||
|
||||
public String getRepositoryLink() {
|
||||
return repositoryLink;
|
||||
}
|
||||
|
||||
public void setRepositoryLink(String repositoryLink) {
|
||||
this.repositoryLink = repositoryLink;
|
||||
}
|
||||
|
||||
public boolean isInternal() {
|
||||
return internal;
|
||||
}
|
||||
|
||||
public void setInternal(boolean internal) {
|
||||
this.internal = internal;
|
||||
}
|
||||
|
||||
public String getClassPath() {
|
||||
return classPath;
|
||||
}
|
||||
|
||||
public void setClassPath(String classPath) {
|
||||
this.classPath = classPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Library another) {
|
||||
return getLibraryName().compareToIgnoreCase(another.getLibraryName());
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,11 @@
|
|||
package com.adins.mss.coll.interfaces;
|
||||
|
||||
import com.adins.mss.base.commons.TaskListener;
|
||||
|
||||
/**
|
||||
* Created by kusnendi.muhamad on 28/07/2017.
|
||||
*/
|
||||
|
||||
public interface ReportSummaryInterface {
|
||||
public void getReportSummary(TaskListener listener);
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.adins.mss.odr.catalogue.api;
|
||||
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by olivia.dg on 11/30/2017.
|
||||
*/
|
||||
|
||||
public class LoadPdfResponse extends MssResponseType {
|
||||
@SerializedName("catalogue_file")
|
||||
private String cataloguePdf;
|
||||
|
||||
public String getCataloguePdf() {
|
||||
return cataloguePdf;
|
||||
}
|
||||
|
||||
public void setCataloguePdf(String cataloguePdf) {
|
||||
this.cataloguePdf = cataloguePdf;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue