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.7 KiB |
|
@ -0,0 +1,32 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/newTaskLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_grayscale" >
|
||||
|
||||
<!--<View-->
|
||||
<!--android:id="@+id/actionbar"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="48dp"-->
|
||||
<!--android:background="@drawable/actionbar_background" />-->
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/actionbar"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="5dp"
|
||||
android:footerDividersEnabled="true"
|
||||
android:headerDividersEnabled="true" >
|
||||
|
||||
</ListView>
|
||||
<TextView
|
||||
android:id="@+id/txv_data_not_found"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/data_not_found"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,377 @@
|
|||
package com.adins.mss.svy.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.format.DateFormat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.NewMainActivity;
|
||||
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.tasklog.SurveyTaskAdapter;
|
||||
import com.adins.mss.base.todolist.form.OnTaskListClickListener;
|
||||
import com.adins.mss.base.todolist.form.TasklistListener;
|
||||
import com.adins.mss.base.util.Utility;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.TaskH;
|
||||
import com.adins.mss.dummy.userhelp_dummy.Adapter.NewTaskLogDummyAdapter;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskHDataAccess;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.adins.mss.svy.R;
|
||||
import com.adins.mss.svy.UserHelpSVYDummy;
|
||||
import com.adins.mss.svy.tool.Constants;
|
||||
|
||||
import org.acra.ACRA;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
public class SurveyApprovalByBranchFragment extends Fragment implements OnTaskListClickListener, TasklistListener {
|
||||
public static TaskH selectedApproval;
|
||||
private static Menu mainMenu;
|
||||
private List<TaskH> objects;
|
||||
private SurveyTaskAdapter adapter;
|
||||
// private GridView gridView;
|
||||
private RecyclerView recyclerView;
|
||||
private Context context;
|
||||
private SwipeRefreshLayout mSwipeRefreshLayout;
|
||||
private String errMessage = null;
|
||||
private SurveyActivityInterface iSurveyActivity;
|
||||
private LinearLayoutManager layoutManager;
|
||||
private boolean showDummy = true;
|
||||
|
||||
@Override
|
||||
public void onAttach(Context activity) {
|
||||
super.onAttach(activity);
|
||||
this.context = activity;
|
||||
iSurveyActivity = new SurveyActivityImpl(context);
|
||||
setHasOptionsMenu(true);
|
||||
try {
|
||||
objects = Constants.listOfApprovalTask;
|
||||
if (objects == null || objects.size() == 0) {
|
||||
objects = TaskHDataAccess.getAllApprovalForBranch(getActivity(), GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
Constants.listOfApprovalTask = objects;
|
||||
}
|
||||
adapter = new SurveyTaskAdapter(activity, objects, SurveyApprovalByBranchFragment.this);
|
||||
|
||||
try {
|
||||
// MSMainMenuActivity.mnSVYApprovalByBranch.setCounter(String.valueOf(Constants.getCounterApprovalTaskByBranch(getActivity())));
|
||||
// if(MainMenuActivity.menuAdapter!=null)
|
||||
// MainMenuActivity.menuAdapter.notifyDataSetChanged();
|
||||
// MainMenuActivity.setDrawerCounter();
|
||||
NewMainActivity.setCounter();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
ACRA.getErrorReporter().putCustomData("ErrorMainMenuActivity", e.getMessage());
|
||||
ACRA.getErrorReporter().putCustomData("ErrorMainMenuActivity", DateFormat.format("yyyy.MM.dd G \'at\' HH:mm:ss z", Calendar.getInstance().getTime()).toString());
|
||||
ACRA.getErrorReporter().handleSilentException(new Exception("Exception saat set Drawer Counter"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
// TODO: handle exception
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
Utility.freeMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.new_fragment_survey_verification, container, false);
|
||||
this.mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipeRefreshLayout);
|
||||
this.mSwipeRefreshLayout.setColorSchemeColors(getResources().getColor(com.adins.mss.base.R.color.tv_light),
|
||||
getResources().getColor(com.adins.mss.base.R.color.tv_normal),
|
||||
getResources().getColor(com.adins.mss.base.R.color.tv_dark),
|
||||
getResources().getColor(com.adins.mss.base.R.color.tv_darker));
|
||||
this.mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
public void onRefresh() {
|
||||
SurveyApprovalByBranchFragment.this.initiateRefresh();
|
||||
}
|
||||
});
|
||||
// getActivity().getActionBar().setTitle(getString(com.adins.mss.svy.R.string.title_mn_approval_bybranch));
|
||||
|
||||
// olivia : set toolbar
|
||||
getActivity().findViewById(com.adins.mss.base.R.id.search).setVisibility(View.GONE);
|
||||
getActivity().findViewById(com.adins.mss.base.R.id.spinner).setVisibility(View.GONE);
|
||||
getActivity().setTitle(getString(com.adins.mss.base.R.string.title_mn_approval_bybranch));
|
||||
|
||||
recyclerView = (RecyclerView) view.findViewById(R.id.list);
|
||||
layoutManager = new LinearLayoutManager(getContext());
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
recyclerView.setHasFixedSize(true);
|
||||
recyclerView.getRecycledViewPool().setMaxRecycledViews(1, 500);
|
||||
recyclerView.setAdapter(adapter);
|
||||
if(Global.ENABLE_USER_HELP &&
|
||||
showDummy &&
|
||||
Global.userHelpDummyGuide.get(SurveyApprovalByBranchFragment.this.getClass().getSimpleName()) != null &&
|
||||
Global.userHelpDummyGuide.get(SurveyApprovalByBranchFragment.this.getClass().getSimpleName()).size()>0) {
|
||||
NewTaskLogDummyAdapter dummyAdapter = new NewTaskLogDummyAdapter();
|
||||
recyclerView.setAdapter(dummyAdapter);
|
||||
UserHelpSVYDummy userHelpSVYDummy = new UserHelpSVYDummy();
|
||||
userHelpSVYDummy.showDummyVerif(SurveyApprovalByBranchFragment.this.getActivity(),SurveyApprovalByBranchFragment.this.getClass().getSimpleName(), recyclerView,adapter);
|
||||
showDummy = false;
|
||||
}
|
||||
// initiateRefresh();
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if(item.getItemId() == R.id.mnGuide){
|
||||
if(!Global.BACKPRESS_RESTRICTION) {
|
||||
NewTaskLogDummyAdapter dummyAdapter = new NewTaskLogDummyAdapter();
|
||||
recyclerView.setAdapter(dummyAdapter);
|
||||
UserHelpSVYDummy userHelpSVYDummy = new UserHelpSVYDummy();
|
||||
userHelpSVYDummy.showDummyVerif(SurveyApprovalByBranchFragment.this.getActivity(), SurveyApprovalByBranchFragment.this.getClass().getSimpleName(), recyclerView, adapter);
|
||||
showDummy = false;
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void initiateRefresh() {
|
||||
// RefreshBackgroundTask task = new RefreshBackgroundTask();
|
||||
// task.execute();
|
||||
iSurveyActivity.getBackgroundTask(SurveyApprovalByBranchFragment.this, false, true);
|
||||
}
|
||||
|
||||
private void onRefreshComplete(List<TaskH> result) {
|
||||
this.mSwipeRefreshLayout.setRefreshing(false);
|
||||
NiftyDialogBuilder fragment;
|
||||
objects = result;
|
||||
|
||||
// if (this.errMessage != null) {
|
||||
// fragment = NiftyDialogBuilder.getInstance(this.context);
|
||||
// fragment.withTitle(context.getString(com.adins.mss.base.R.string.error_capital)).withMessage(this.errMessage).show();
|
||||
// } else
|
||||
if (result != null && result.size() != 0) {
|
||||
try {
|
||||
//if(objects==null || objects.size()==0){
|
||||
Constants.listOfApprovalTask = objects;
|
||||
adapter = new SurveyTaskAdapter(getActivity(), objects, SurveyApprovalByBranchFragment.this);
|
||||
recyclerView.setAdapter(adapter);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
// TODO: handle exception
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// Constants.listOfApprovalTask = objects;
|
||||
// adapter = new TaskLogArrayAdapter(getActivity(), objects, false);
|
||||
// listView.setAdapter(adapter);
|
||||
// //MainMenuActivity.mnSVYApproval.setCounter(String.valueOf(Constants.getCounterApprovalTask(context)));
|
||||
// fragment = NiftyDialogBuilder.getInstance(this.context);
|
||||
// fragment.withTitle(context.getString(com.adins.mss.base.R.string.info_capital)).withMessage(getString(com.adins.mss.base.R.string.msgNoApproval)).show();
|
||||
// }
|
||||
|
||||
try {
|
||||
// MSMainMenuActivity.mnSVYApprovalByBranch.setCounter(String.valueOf(Constants.getCounterApprovalTaskByBranch(getActivity())));
|
||||
// if(MainMenuActivity.menuAdapter!=null)
|
||||
// MainMenuActivity.menuAdapter.notifyDataSetChanged();
|
||||
// MainMenuActivity.setDrawerCounter();
|
||||
NewMainActivity.setCounter();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
ACRA.getErrorReporter().putCustomData("ErrorMainMenuActivity", e.getMessage());
|
||||
ACRA.getErrorReporter().putCustomData("ErrorMainMenuActivity", DateFormat.format("yyyy.MM.dd G \'at\' HH:mm:ss z", Calendar.getInstance().getTime()).toString());
|
||||
ACRA.getErrorReporter().handleSilentException(new Exception("Exception saat set Drawer Counter"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
adapter = null;
|
||||
Constants.listOfApprovalTask = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
// getActivity().getActionBar().removeAllTabs();
|
||||
// getActivity().getActionBar().setTitle(getString(com.adins.mss.svy.R.string.title_mn_approval_bybranch));
|
||||
// getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||
|
||||
// olivia : set toolbar
|
||||
getActivity().findViewById(com.adins.mss.base.R.id.search).setVisibility(View.GONE);
|
||||
getActivity().findViewById(com.adins.mss.base.R.id.spinner).setVisibility(View.GONE);
|
||||
getActivity().setTitle(getString(com.adins.mss.base.R.string.title_mn_approval_bybranch));
|
||||
|
||||
try {
|
||||
// MSMainMenuActivity.mnSVYApprovalByBranch.setCounter(String.valueOf(Constants.getCounterApprovalTaskByBranch(getActivity())));
|
||||
// if(MainMenuActivity.menuAdapter!=null)
|
||||
// MainMenuActivity.menuAdapter.notifyDataSetChanged();
|
||||
// MainMenuActivity.setDrawerCounter();
|
||||
NewMainActivity.setCounter();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
ACRA.getErrorReporter().putCustomData("ErrorMainMenuActivity", e.getMessage());
|
||||
ACRA.getErrorReporter().putCustomData("ErrorMainMenuActivity", DateFormat.format("yyyy.MM.dd G \'at\' HH:mm:ss z", Calendar.getInstance().getTime()).toString());
|
||||
ACRA.getErrorReporter().handleSilentException(new Exception("Exception saat set Drawer Counter"));
|
||||
}
|
||||
|
||||
// if(objects!=null && objects.size()>0){
|
||||
objects = TaskHDataAccess.getAllApprovalForBranch(getActivity(), GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
Constants.listOfApprovalTask = objects;
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClickListener(TaskH item, int position) {
|
||||
selectedApproval = item;
|
||||
SurveyHeaderBean header = new SurveyHeaderBean(selectedApproval);
|
||||
// TODO Action Lempar ke Customer ACtivity
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(CustomerFragment.SURVEY_HEADER, header);
|
||||
bundle.putInt(CustomerFragment.SURVEY_MODE, Global.MODE_VIEW_SENT_SURVEY);
|
||||
Fragment fragment = com.adins.mss.base.dynamicform.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 onItemLongClickListener(TaskH item, int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshBackgroundCancelled(boolean value) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshBackgroundComplete(List<TaskH> result) {
|
||||
onRefreshComplete(result);
|
||||
}
|
||||
|
||||
// @SuppressLint({"NewApi"})
|
||||
// private class RefreshBackgroundTask extends AsyncTask<Void, Void, List<TaskH>> {
|
||||
// static final int TASK_DURATION = 2000;
|
||||
//
|
||||
// private RefreshBackgroundTask() {
|
||||
// }
|
||||
//
|
||||
// protected List<TaskH> doInBackground(Void... params) {
|
||||
// List<TaskH> result = null;
|
||||
// User user = GlobalData.getSharedGlobalData().getUser();
|
||||
//
|
||||
// if (Tool.isInternetconnected(context)) {
|
||||
// MssRequestType requestType = new MssRequestType();
|
||||
// requestType.setAudit(GlobalData.getSharedGlobalData().getAuditData());
|
||||
// requestType.addImeiAndroidIdToUnstructured();
|
||||
//
|
||||
// String json = GsonHelper.toJson(requestType);
|
||||
// String url = GlobalData.getSharedGlobalData().getURL_GET_LIST_APPROVAL();
|
||||
// boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
|
||||
// boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
|
||||
// HttpCryptedConnection httpConn = new HttpCryptedConnection(getActivity(), encrypt, decrypt);
|
||||
// HttpConnectionResult serverResult = null;
|
||||
// try {
|
||||
// result = TaskHDataAccess.getAllApprovalForBranch(context, GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
// if (result != null && result.size() > 0)
|
||||
// serverResult = httpConn.requestToServer(url, json, Global.SORTCONNECTIONTIMEOUT);
|
||||
// else
|
||||
// serverResult = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
|
||||
// } catch (Exception e) { FireCrash.log(e);
|
||||
// e.printStackTrace();
|
||||
// errMessage = e.getMessage();
|
||||
// }
|
||||
//
|
||||
// String stringResult = serverResult.getResult();
|
||||
//
|
||||
// try {
|
||||
// JsonResponseTaskList taskList = GsonHelper.fromJson(stringResult, JsonResponseTaskList.class);
|
||||
// if (taskList.getStatus().getCode() == 0) {
|
||||
// List<TaskH> listTaskH = taskList.getListTaskList();
|
||||
// if (listTaskH != null && listTaskH.size() > 0) {
|
||||
// String uuid_timelineType = TimelineTypeDataAccess.getTimelineTypebyType(getActivity(), Global.TIMELINE_TYPE_APPROVAL).getUuid_timeline_type();
|
||||
// for (TaskH taskHLocal : result) {
|
||||
// boolean wasDeleted = true;
|
||||
// for (TaskH taskH : listTaskH) {
|
||||
// if (taskH.getUuid_task_h().equals(taskHLocal.getUuid_task_h()))
|
||||
// wasDeleted = false;
|
||||
// }
|
||||
// if (wasDeleted) {
|
||||
// TaskHDataAccess.delete(getActivity(), taskHLocal);
|
||||
// /*Timeline timeline = TimelineDataAccess.getOneTimelineByTaskH(getActivity(), user.getUuid_user(), taskHLocal.getUuid_task_h(), uuid_timelineType);
|
||||
// if(timeline != null)
|
||||
// TimelineDataAccess.delete(getActivity(), timeline);*/
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (TaskH taskH : listTaskH) {
|
||||
// taskH.setUser(user);
|
||||
// taskH.setIs_verification(Global.TRUE_STRING);
|
||||
//
|
||||
// String uuid_scheme = taskH.getUuid_scheme();
|
||||
// Scheme scheme = SchemeDataAccess.getOne(getActivity(), uuid_scheme);
|
||||
// if (scheme != null) {
|
||||
// taskH.setScheme(scheme);
|
||||
//
|
||||
// TaskH h = TaskHDataAccess.getOneHeader(getActivity(), taskH.getUuid_task_h());
|
||||
// boolean wasInTimeline = TimelineDataAccess.getOneTimelineByTaskH(getActivity(), user.getUuid_user(), taskH.getUuid_task_h(), uuid_timelineType) != null;
|
||||
// if (h != null && h.getStatus() != null) {
|
||||
// if (!ToDoList.isOldTask(h)) {
|
||||
// TaskHDataAccess.addOrReplace(getActivity(), taskH);
|
||||
// if (!wasInTimeline)
|
||||
// TimelineManager.insertTimeline(getActivity(), taskH);
|
||||
// }
|
||||
// } else {
|
||||
// TaskHDataAccess.addOrReplace(getActivity(), taskH);
|
||||
// if (!wasInTimeline)
|
||||
// TimelineManager.insertTimeline(getActivity(), taskH);
|
||||
// }
|
||||
// } else {
|
||||
// errMessage = context.getString(com.adins.mss.base.R.string.scheme_not_found);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// errMessage = stringResult;
|
||||
// }
|
||||
// } catch (Exception e) { FireCrash.log(e);
|
||||
// errMessage = e.getMessage();
|
||||
// }
|
||||
// }
|
||||
// try {
|
||||
// if (context != null) {
|
||||
// result = TaskHDataAccess.getAllApprovalForBranch(context, GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
// } else if (getActivity() != null) {
|
||||
// result = TaskHDataAccess.getAllApprovalForBranch(context, GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
// } else {
|
||||
// result = TaskHDataAccess.getAllApprovalForBranch(context, GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
// }
|
||||
// } catch (Exception var6) {
|
||||
// var6.printStackTrace();
|
||||
// errMessage = var6.getMessage();
|
||||
// }
|
||||
//
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// protected void onPostExecute(List<TaskH> result) {
|
||||
// super.onPostExecute(result);
|
||||
// SurveyApprovalByBranchFragment.this.onRefreshComplete(result);
|
||||
// }
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/summaryReviewLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/tv_white"
|
||||
android:padding="@dimen/padding_medium">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/questionNoLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:paddingRight="@dimen/ptr_progress_bar_stroke_width"
|
||||
android:text="0." />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/questionTextLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/questionNoLabel"
|
||||
android:text="label" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/questionDropdownLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_below="@id/questionTextLabel">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/questionSummaryDropdown"
|
||||
android:spinnerMode="dropdown"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:padding="5dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_expand"
|
||||
android:layout_alignRight="@+id/questionSummaryDropdown"
|
||||
android:layout_alignBottom="@+id/questionSummaryDropdown"
|
||||
android:layout_alignTop="@+id/questionSummaryDropdown"
|
||||
android:layout_marginRight="10dp"
|
||||
android:tint="@color/gradient_end"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/reviewSummaryScroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/questionDropdownLayout">
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/reviewSummaryAnswerLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="1">
|
||||
|
||||
</TableLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/questionTextAnswer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/reviewSummaryScroll"
|
||||
android:layout_toEndOf="@+id/questionNoLabel"
|
||||
android:layout_toRightOf="@+id/questionNoLabel"
|
||||
android:text="answer"
|
||||
android:textAppearance="@android:style/TextAppearance.Small" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/line_height"
|
||||
android:layout_below="@+id/questionTextAnswer"
|
||||
android:background="@color/tv_gray" />
|
||||
</RelativeLayout>
|
Binary file not shown.
After Width: | Height: | Size: 178 KiB |
|
@ -0,0 +1,308 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.adins.mss.base.dynamicform.form.DynamicQuestionActivity"
|
||||
android:background="@color/bgColor">
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
app:titleTextAppearance="?android:attr/textAppearanceSmall"
|
||||
android:titleTextColor="@color/fontColorWhite"
|
||||
android:background="@drawable/header" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/mainContainer"
|
||||
android:layout_above="@+id/buttonContainer"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/searchLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/buttonContainer"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:background="@drawable/bottomnav_background"
|
||||
android:padding="3dp" >
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/autoCompleteSearch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:layout_toLeftOf="@+id/btnSearch"
|
||||
android:hint="@string/search_question"
|
||||
android:padding="10dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall">
|
||||
</AutoCompleteTextView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnSearch"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="7dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/button_background_round"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_search_white" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/buttonContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:padding="5dp"
|
||||
android:weightSum="1"
|
||||
android:background="@drawable/bottomnav_background"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:id="@+id/btnBackLayout"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_weight="0.2"-->
|
||||
<!--android:visibility="gone"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
<!--<ImageButton-->
|
||||
<!--android:id="@+id/btnBack"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:src="@drawable/ic_back"-->
|
||||
<!--android:gravity="center"-->
|
||||
<!--android:scaleType="centerInside"-->
|
||||
<!--android:background="@drawable/circle_button"-->
|
||||
<!--/>-->
|
||||
<!--<TextView-->
|
||||
<!--android:id="@+id/textView1"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:textColor="#FFFFFF"-->
|
||||
<!--android:gravity="center"-->
|
||||
<!--android:text="@string/btnBack"-->
|
||||
<!--android:textSize="10dp"/>-->
|
||||
<!--</LinearLayout>-->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnSaveLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:id="@+id/btnSave"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/ic_save_draft"
|
||||
android:scaleType="center"
|
||||
android:background="@drawable/button_bg" />
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnSave"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnSearchLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/btnSearchBar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="0.25"
|
||||
android:background="@drawable/button_bg"
|
||||
android:drawableTop="@drawable/icon_search"
|
||||
android:gravity="center"
|
||||
android:padding="5dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnSearch"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnSendLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnSend"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_send" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnSend"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnVerifiedLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:id="@+id/btnVerified"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_verify"/>
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnVerify"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnRejectLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:id="@+id/btnReject"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_close"/>
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnReject"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnApproveLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:id="@+id/btnApprove"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_verify"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnApprove"
|
||||
android:textSize="10dp" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnNextLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnNext"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_next_black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnNext"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/btnCloseLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnClose"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/button_bg"
|
||||
android:gravity="center"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/icon_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/fontColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/btnClose"
|
||||
android:textSize="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,16 @@
|
|||
package com.adins.mss.base.scheduler;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
public class ClearPdfBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
public static final int REQUEST_CODE = 12345;
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Intent i = new Intent(context, ClearPdfSchedulerService.class);
|
||||
context.startService(i);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue