Versión 9.4 quitando conductores y modificando carga ruta cualquiera. Añadidos ficheros a versionar
This commit is contained in:
parent
df82d1742a
commit
2a311c72ce
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="21114523025303" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2022-09-30T05:27:19.603582900Z" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: org.jetbrains:annotations:13.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/73368c3b0887f3adc2c2730dd1b95d7c3781aaf3/annotations-13.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/5991ca87ef1fb5544943d9abc5a9a37583fabe03/annotations-13.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.4.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.0/63e75298e93d4ae0b299bb869cf0c627196f8843/kotlin-stdlib-1.4.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.0/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-1.4.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.0/4a5e4f984e6c3e380f100857f04aba4f3e5fbda8/kotlin-stdlib-1.4.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0" type="kotlin.common">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.0/1c752cce0ead8d504ccc88a4fed6471fd83ab0dd/kotlin-stdlib-common-1.4.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.0/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-common-1.4.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.0/a8b4f1baa61d83112d68bb4a3230d58b5972e3c3/kotlin-stdlib-common-1.4.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.0/9cc187c3dfaf6e4001bdf962e3cdadff7690261b/kotlin-stdlib-jdk7-1.4.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.0/5b8f86fea035328fc9e8c660773037a3401ce25f/kotlin-stdlib-jdk7-1.4.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.0/710a0b1d4fa5e809dd4005eff7e334ee38f33ae8/kotlin-stdlib-jdk7-1.4.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":24,"versionName":"9.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,47 @@
|
|||
package verdnatura.es.repartoverdnatura.ADAPTERS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Check;
|
||||
import verdnatura.es.repartoverdnatura.MODELS.ExpeditionInfoLog;
|
||||
import verdnatura.es.repartoverdnatura.R;
|
||||
|
||||
|
||||
public class ExpeditionLogAdapter extends ArrayAdapter<ExpeditionInfoLog> {
|
||||
|
||||
|
||||
public ExpeditionLogAdapter(@NonNull Context context, List<ExpeditionInfoLog> expeditionsLog) {
|
||||
super(context,0,expeditionsLog);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
ExpeditionInfoLog c = getItem(position);
|
||||
|
||||
if (convertView == null){
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_expedition_info,parent,false);
|
||||
}
|
||||
|
||||
TextView txtCreated = convertView.findViewById(R.id.txtCreated);
|
||||
TextView txtNameWorker = convertView.findViewById(R.id.txtNameWorker);
|
||||
TextView txtId = convertView.findViewById(R.id.txtState);
|
||||
|
||||
txtCreated.setText(c.getCreated());
|
||||
txtNameWorker.setText(c.getName());
|
||||
txtId.setText(c.getDescription());
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package verdnatura.es.repartoverdnatura.ADAPTERS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Check;
|
||||
import verdnatura.es.repartoverdnatura.R;
|
||||
|
||||
public class ExpeditionScannedAdapter extends ArrayAdapter<Check> {
|
||||
|
||||
public ExpeditionScannedAdapter(Context context, List<Check> signs) {
|
||||
super(context,0,signs);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
Check c = getItem(position);
|
||||
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_expeditionscanned, parent, false);
|
||||
}
|
||||
|
||||
TextView txtId = convertView.findViewById(R.id.txtId);
|
||||
txtId.setText(c.getId());
|
||||
|
||||
return convertView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package verdnatura.es.repartoverdnatura.ADAPTERS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import verdnatura.es.repartoverdnatura.ExpeditionSummaryActivity;
|
||||
import verdnatura.es.repartoverdnatura.MODELS.ExpeditionInfoSummary;
|
||||
import verdnatura.es.repartoverdnatura.R;
|
||||
|
||||
|
||||
public class ExpeditionSummaryAdapter extends ArrayAdapter<ExpeditionInfoSummary> {
|
||||
|
||||
|
||||
public ExpeditionSummaryAdapter(@NonNull Context context, List<ExpeditionInfoSummary> expeditionsSummary) {
|
||||
super(context, 0, expeditionsSummary);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
final ExpeditionInfoSummary eis = getItem(position);
|
||||
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_expedition_summary, parent, false);
|
||||
}
|
||||
|
||||
|
||||
final TextView txtConsignatario = convertView.findViewById(R.id.txtConsignatario);
|
||||
//TextView txtRoute = convertView.findViewById(R.id.txtRoute);
|
||||
TextView txtTotal = convertView.findViewById(R.id.txtTotal);
|
||||
TextView txtPacking = convertView.findViewById(R.id.txtPacking);
|
||||
TextView txtScanned = convertView.findViewById(R.id.txtScanned);
|
||||
TextView txtLost = convertView.findViewById(R.id.txtLost);
|
||||
TextView txtDelivered = convertView.findViewById(R.id.txtDelivered);
|
||||
ImageView showExp = convertView.findViewById(R.id.showExp);
|
||||
LinearLayout fondo = convertView.findViewById(R.id.fondo);
|
||||
|
||||
|
||||
txtConsignatario.setText(eis.getAddress());
|
||||
txtTotal.setText(eis.getTotal().toString());
|
||||
txtPacking.setText(eis.getItemPackingType());
|
||||
txtScanned.setText(eis.getDelivery());
|
||||
txtLost.setText(eis.getLost());
|
||||
txtDelivered.setText(eis.getDelivered());
|
||||
|
||||
if (!(eis.getDelivery() == null) && eis.getDelivery().equals(eis.getTotal().toString())) {
|
||||
fondo.setBackgroundColor(getContext().getResources().getColor(R.color.verdnatura_black));
|
||||
}
|
||||
if (!(eis.getLost() == null) && (!eis.getLost().equals("0") || !eis.getDelivery().equals(eis.getTotal().toString()))) {
|
||||
fondo.setBackgroundColor(getContext().getResources().getColor(R.color.verdnatura_pumpkin_light));
|
||||
}
|
||||
if (!(eis.getDelivered() == null) && eis.getDelivered().equals(eis.getTotal().toString())) {
|
||||
fondo.setBackgroundColor(getContext().getResources().getColor(R.color.verdnatura_black));
|
||||
}
|
||||
|
||||
txtConsignatario.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
// ((ExpeditionSummaryActivity) getContext()).goToExpeditionByAddress(eis.getAddress(), eis.getRoute().toString(), position);
|
||||
((ExpeditionSummaryActivity) getContext()).goToExpeditionByAddress(eis.getAddress(), position);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
showExp.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
((ExpeditionSummaryActivity) getContext()).gotoShowExpeditions(eis.getAddress(), eis.getRoute().toString());
|
||||
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package verdnatura.es.repartoverdnatura.ADAPTERS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Check;
|
||||
import verdnatura.es.repartoverdnatura.R;
|
||||
|
||||
|
||||
public class RutaSelectionAdapter extends ArrayAdapter<Check> {
|
||||
public RutaSelectionAdapter(Context context, List<Check> signs) {
|
||||
super(context,0,signs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
Check c = getItem(position);
|
||||
|
||||
if (convertView == null){
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_routeselected,parent,false);
|
||||
}
|
||||
|
||||
TextView txtId = convertView.findViewById(R.id.txtId);
|
||||
TextView txtAddress = convertView.findViewById(R.id.txtAddress);
|
||||
/* TextView txtWarehouse = convertView.findViewById(R.id.txtWarehouse);
|
||||
TextView txtBulto = convertView.findViewById(R.id.txtBulto);*/
|
||||
TextView txtCheck = convertView.findViewById(R.id.txtCheck);
|
||||
LinearLayout fondo = convertView.findViewById(R.id.fondo);
|
||||
|
||||
txtId.setText(c.getId());
|
||||
|
||||
txtAddress.setText(c.getAddressFk()+" - "+c.getStreet()+" "+c.getCity()+" "+c.getPostalCode());
|
||||
|
||||
/* txtWarehouse.setText(c.getWarehouse());
|
||||
|
||||
txtBulto.setText(c.getBultos());*/
|
||||
|
||||
|
||||
if (c.getChecked().equals("1")){
|
||||
fondo.setBackgroundColor(getContext().getResources().getColor(R.color.colorAccent));
|
||||
txtCheck.setText("OK");
|
||||
}else{
|
||||
fondo.setBackgroundColor(getContext().getResources().getColor(R.color.colorMainHeader));
|
||||
txtCheck.setText("no");
|
||||
}
|
||||
|
||||
return convertView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,322 @@
|
|||
package verdnatura.es.repartoverdnatura
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.*
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import verdnatura.es.repartoverdnatura.ADAPTERS.ExpeditionLogAdapter
|
||||
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Check
|
||||
import verdnatura.es.repartoverdnatura.MODELS.ExpeditionInfoLog
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Ruta
|
||||
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils
|
||||
import verdnatura.es.repartoverdnatura.UTILS.Utils
|
||||
|
||||
|
||||
class ExpeditionInfoActivity : AppCompatActivity() {
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
|
||||
var listExpedition = ArrayList<ExpeditionInfoLog>()
|
||||
var adapter: ExpeditionLogAdapter? = null
|
||||
var listView: ListView? = null
|
||||
private var restClient: RestClient? = null
|
||||
|
||||
var txtScanned: EditText? = null
|
||||
var textViewTitle: TextView? = null
|
||||
var textScannedCurrent: String = ""
|
||||
|
||||
private lateinit var switchFound: Switch
|
||||
private var switchDescrip: TextView? = null
|
||||
private var idRoute: TextView? = null
|
||||
private var plateRoute: TextView? = null
|
||||
private var timeRoute: TextView? = null
|
||||
private var dateRoute: TextView? = null
|
||||
private var agencyRoute: TextView? = null
|
||||
private var allRoute: LinearLayout? = null
|
||||
|
||||
private lateinit var listRoutes: List<Ruta>
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_expedition_info)
|
||||
mperror = MediaPlayer.create((this), R.raw.error)
|
||||
mpok = MediaPlayer.create((this), R.raw.ok)
|
||||
restClient = ApiUtils.getAPIService()
|
||||
listView = findViewById(R.id.listExpeditionInfo)
|
||||
txtScanned = findViewById(R.id.txtScanned)
|
||||
textViewTitle = findViewById(R.id.textViewTitle)
|
||||
idRoute = findViewById(R.id.idRoute)
|
||||
agencyRoute = findViewById(R.id.agencyRoute)
|
||||
dateRoute = findViewById(R.id.dateRoute)
|
||||
timeRoute = findViewById(R.id.timeRoute)
|
||||
plateRoute = findViewById(R.id.plateRoute)
|
||||
|
||||
allRoute = findViewById(R.id.allRoute)
|
||||
|
||||
|
||||
switchFound = findViewById(R.id.switchFound)
|
||||
switchDescrip = findViewById(R.id.switchDescrip)
|
||||
|
||||
setEvents()
|
||||
showSwitch(View.GONE)
|
||||
|
||||
}
|
||||
|
||||
private fun expeditionState_addByExpedition(expeditions: List<Check>, state: String) {
|
||||
Utils.progressBar.dialog.show()
|
||||
val stateData: Array<Any?> = arrayOfNulls(2)
|
||||
|
||||
stateData[0] = expeditions
|
||||
stateData[1] = state
|
||||
|
||||
|
||||
restClient!!.expeditionState_addByExpeditionMulti(Utils.getMapWhitUser(this), stateData)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
//adapter!!.notifyDataSetChanged()
|
||||
expedition_getLog(expeditions[0].id)
|
||||
|
||||
} else {
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
"Expedición no encontrada"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
resources.getString(R.string.error_conexion) + ".Vuelva a intentarlo de nuevo"
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun expedition_getLog(expedition: String) {
|
||||
|
||||
val stateData: Array<String?> = arrayOfNulls(1)
|
||||
|
||||
stateData[0] = expedition
|
||||
listExpedition.clear()
|
||||
restClient!!.expedition_getLog(Utils.getMapWhitUser(this), stateData)
|
||||
.enqueue(object : Callback<List<ExpeditionInfoLog>> {
|
||||
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<ExpeditionInfoLog>>,
|
||||
response: Response<List<ExpeditionInfoLog>>
|
||||
) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
showSwitch(View.VISIBLE)
|
||||
for (expedInfo in response.body()!!) {
|
||||
|
||||
listExpedition.add(expedInfo)
|
||||
|
||||
}
|
||||
|
||||
if (listExpedition.isEmpty() || listExpedition.size < 1) {
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
"No se han encontrado logs para la expedición: " + expedition
|
||||
)
|
||||
}
|
||||
setAdapter(listExpedition)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<List<ExpeditionInfoLog>>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
showSwitch(View.GONE)
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun route_getFromExpedition(expedition: String) {
|
||||
|
||||
val stateData: Array<String?> = arrayOfNulls(1)
|
||||
|
||||
stateData[0] = expedition
|
||||
restClient!!.get_routesFromExpedition(Utils.getMapWhitUser(this), stateData)
|
||||
.enqueue(object : Callback<List<Ruta>> {
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<Ruta>>,
|
||||
response: Response<List<Ruta>>
|
||||
) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
|
||||
if (response.body().isNullOrEmpty()) {
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
"Expedición sin ruta"
|
||||
)
|
||||
} else {
|
||||
|
||||
allRoute!!.visibility = View.VISIBLE
|
||||
|
||||
listRoutes = response.body()!!
|
||||
for (route in response.body()!!) {
|
||||
idRoute!!.text = route.id
|
||||
plateRoute!!.text = route.plate
|
||||
timeRoute!!.text = route.hour
|
||||
dateRoute!!.text = route.date
|
||||
agencyRoute!!.text = route.agency
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onFailure(call: Call<List<Ruta>>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionInfoActivity,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun showSwitch(visibility: Int) {
|
||||
switchFound.visibility = visibility
|
||||
switchDescrip!!.visibility = visibility
|
||||
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
switchFound.setOnClickListener({ showMessageInfo() })
|
||||
|
||||
txtScanned!!.setOnEditorActionListener { textView, i, keyEvent ->
|
||||
Utils.progressBar.show(this, getResources().getString(R.string.please_wait))
|
||||
expedition_getLog(txtScanned!!.text.toString())
|
||||
textViewTitle!!.setText("Expedición :" + txtScanned!!.text.toString())
|
||||
textScannedCurrent = txtScanned!!.text.toString()
|
||||
route_getFromExpedition(textScannedCurrent)
|
||||
txtScanned!!.setText("")
|
||||
hideKeyboard()
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
listView!!.setOnFocusChangeListener { view, b ->
|
||||
txtScanned!!.requestFocus()
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fun showMessageInfo() {
|
||||
|
||||
if (switchFound.isChecked) {
|
||||
//Utils.showErrorDialog(this@ExpeditionInfoActivity, "Esta opción te permite eliminar las expediciones escaneadas.")
|
||||
if (textScannedCurrent.isEmpty()) {
|
||||
Utils.showErrorDialog(this@ExpeditionInfoActivity, "Escanee antes una expedición.")
|
||||
} else {
|
||||
|
||||
val alertDialog = android.app.AlertDialog.Builder(this).create()
|
||||
alertDialog.setTitle("Información")
|
||||
alertDialog.setMessage("¿Desea marcar la expedición como encontrada?")
|
||||
|
||||
alertDialog.setButton(
|
||||
android.app.AlertDialog.BUTTON_POSITIVE, "SI"
|
||||
) { dialog, which ->
|
||||
|
||||
|
||||
var expeditions = arrayListOf<Check>()
|
||||
expeditions.add(
|
||||
Check(
|
||||
textScannedCurrent,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
)
|
||||
)
|
||||
expeditionState_addByExpedition(expeditions, "FOUND")
|
||||
|
||||
}
|
||||
alertDialog.setButton(
|
||||
android.app.AlertDialog.BUTTON_NEGATIVE, "NO"
|
||||
|
||||
) { dialog, which ->
|
||||
switchFound.isChecked = false
|
||||
}
|
||||
|
||||
alertDialog.show()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun Activity.hideKeyboard() {
|
||||
hideKeyboard(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Context.hideKeyboard(view: View) {
|
||||
val inputMethodManager =
|
||||
getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
|
||||
fun setAdapter(listInfo: ArrayList<ExpeditionInfoLog>) {
|
||||
adapter = ExpeditionLogAdapter(
|
||||
this,
|
||||
listInfo
|
||||
)
|
||||
this.listView!!.adapter = adapter
|
||||
adapter!!.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun exit(view: View) {
|
||||
|
||||
finish()
|
||||
}
|
||||
|
||||
fun onLoadSelected(view: View) {
|
||||
if (listRoutes.isNotEmpty()) {
|
||||
val i = Intent(this, LoadVanActivity::class.java)
|
||||
i.putExtra("route", listRoutes[0])
|
||||
startActivity(i)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,202 @@
|
|||
package verdnatura.es.repartoverdnatura
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.OnFocusChangeListener
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.*
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import verdnatura.es.repartoverdnatura.ADAPTERS.CheckAdapter
|
||||
import verdnatura.es.repartoverdnatura.ADAPTERS.ExpeditionScannedAdapter
|
||||
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Check
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Ruta
|
||||
import verdnatura.es.repartoverdnatura.MainActivity.listaRutasCargadas
|
||||
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils
|
||||
import verdnatura.es.repartoverdnatura.UTILS.LocalStorage
|
||||
import verdnatura.es.repartoverdnatura.UTILS.Utils
|
||||
import java.text.ParseException
|
||||
import java.util.*
|
||||
|
||||
|
||||
class ExpeditionScanActivity : AppCompatActivity() {
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
var listCheck = ArrayList<Check>()
|
||||
|
||||
var adapter: ExpeditionScannedAdapter? = null
|
||||
var listView: ListView? = null
|
||||
private var restClient: RestClient? = null
|
||||
var txtRuta: EditText? = null
|
||||
var txtIdRuta: TextView? = null
|
||||
var txtMessage: TextView? = null
|
||||
|
||||
private lateinit var switchLoad:Switch
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_scan)
|
||||
mperror = MediaPlayer.create((this), R.raw.error)
|
||||
mpok = MediaPlayer.create((this), R.raw.ok)
|
||||
restClient = ApiUtils.getAPIService()
|
||||
listView = findViewById(R.id.listRoute)
|
||||
txtRuta = findViewById(R.id.txtRuta)
|
||||
|
||||
txtIdRuta = findViewById(R.id.textView41)
|
||||
switchLoad = findViewById<View>(R.id.switchLoad) as Switch
|
||||
switchLoad.visibility= GONE
|
||||
|
||||
setEvents()
|
||||
setAdapter()
|
||||
|
||||
}
|
||||
|
||||
private fun expeditionState_addByExpedition(expeditions: List<Check>,state:String){
|
||||
|
||||
val stateData: Array<Any?> = arrayOfNulls(2)
|
||||
|
||||
stateData[0]=expeditions
|
||||
stateData[1]=state
|
||||
|
||||
|
||||
restClient!!.expeditionState_addByExpeditionMulti(Utils.getMapWhitUser(this), stateData)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
|
||||
//if (action == "add") {
|
||||
|
||||
listCheck.addAll(expeditions)
|
||||
|
||||
/* } else {
|
||||
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Toast.makeText(
|
||||
baseContext,
|
||||
"Expedición escaneada sin estado",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
|
||||
var position=listCheck.indexOfFirst { it.id==expedition }
|
||||
listCheck.removeAt(
|
||||
position)
|
||||
|
||||
}*/
|
||||
adapter!!.notifyDataSetChanged()
|
||||
txtRuta!!.setText("")
|
||||
|
||||
}else{
|
||||
Utils.showErrorDialog(this@ExpeditionScanActivity, "Expedición no encontrada")
|
||||
txtRuta!!.setText("")
|
||||
}
|
||||
}
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(this@ExpeditionScanActivity, resources.getString(R.string.error_conexion)+".Vuelva a intentarlo de nuevo")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
|
||||
var btnUpload = findViewById<ImageView>(R.id.imageVanLoaded)
|
||||
btnUpload.setOnClickListener{
|
||||
finish()
|
||||
}
|
||||
switchLoad.setOnClickListener({showMessageInfo()})
|
||||
|
||||
val that = this
|
||||
|
||||
txtRuta!!.setOnEditorActionListener { textView, i, keyEvent ->
|
||||
addExpedition(txtRuta!!.text.toString())
|
||||
false
|
||||
}
|
||||
|
||||
listView!!.setOnFocusChangeListener { view, b ->
|
||||
txtRuta!!.requestFocus()
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun addExpedition(textScanned: String) {
|
||||
|
||||
val position = listCheck.indexOfFirst{it.id==textScanned}
|
||||
if (position>=0){
|
||||
mperror!!.start()
|
||||
Toast.makeText(
|
||||
baseContext,
|
||||
"Expedición $textScanned ya escaneada como encontrada",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
txtRuta!!.requestFocus()
|
||||
txtRuta!!.setText("")
|
||||
//Log.d("VERDNATURA::","ENCONTRADA : "+position)
|
||||
}else {
|
||||
Utils.progressBar.show(this,getResources().getString(R.string.please_wait))
|
||||
var expeditions= arrayListOf<Check>()
|
||||
expeditions.add(Check(
|
||||
textScanned,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
))
|
||||
expeditionState_addByExpedition(expeditions, "FOUND")
|
||||
|
||||
}
|
||||
txtRuta!!.requestFocus()
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun Activity.hideKeyboard() {
|
||||
hideKeyboard(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Context.hideKeyboard(view: View) {
|
||||
val inputMethodManager = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
|
||||
fun setAdapter(){
|
||||
adapter = ExpeditionScannedAdapter(this, listCheck)
|
||||
this.listView!!.adapter = adapter
|
||||
adapter!!.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
||||
fun showMessageInfo() {
|
||||
|
||||
if (!switchLoad.isChecked){
|
||||
Utils.showErrorDialog(this@ExpeditionScanActivity, "Esta opción te permite eliminar las expediciones escaneadas.")
|
||||
txtMessage!!.setText("Eliminando")
|
||||
}else{
|
||||
txtMessage!!.setText("Escaneando")
|
||||
}
|
||||
}
|
||||
|
||||
fun exit() {
|
||||
onBackPressed()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,500 @@
|
|||
package verdnatura.es.repartoverdnatura
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.view.View
|
||||
import android.view.View.OnFocusChangeListener
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.EditText
|
||||
import android.widget.ListView
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import verdnatura.es.repartoverdnatura.ADAPTERS.ExpeditionSummaryAdapter
|
||||
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Check
|
||||
import verdnatura.es.repartoverdnatura.MODELS.ExpeditionInfoSummary
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Ruta
|
||||
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils
|
||||
import verdnatura.es.repartoverdnatura.UTILS.LocalStorage
|
||||
import verdnatura.es.repartoverdnatura.UTILS.Utils
|
||||
|
||||
|
||||
class ExpeditionSummaryActivity : AppCompatActivity() {
|
||||
var mpError: MediaPlayer? = null
|
||||
var mpOk: MediaPlayer? = null
|
||||
var mpErrorRepeat: MediaPlayer? = null
|
||||
|
||||
var listExpeditionSummary = ArrayList<ExpeditionInfoSummary>()
|
||||
var adapter: ExpeditionSummaryAdapter? = null
|
||||
var listView: ListView? = null
|
||||
private var restClient: RestClient? = null
|
||||
|
||||
var txtRuta: EditText? = null
|
||||
var txtScan: EditText? = null
|
||||
|
||||
var routeOfLoad: String? = null
|
||||
var route: Ruta? = null
|
||||
|
||||
var textViewRoute: TextView? = null
|
||||
var textAddressSelected: TextView? = null
|
||||
var textLoaded: TextView? = null
|
||||
var textAddressTitle: TextView? = null
|
||||
|
||||
var layoutListView: View? = null
|
||||
|
||||
var totalChecks = 0
|
||||
var checked = 0
|
||||
var itemScanned = false
|
||||
var listCheck = ArrayList<Check>()
|
||||
var totalSend = 0
|
||||
var totalSendSuccessful = 0
|
||||
var positionSelected: Int? = null
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setContentView(R.layout.activity_expedition_summary)
|
||||
|
||||
mpError = MediaPlayer.create((this), R.raw.error)
|
||||
mpOk = MediaPlayer.create((this), R.raw.ok)
|
||||
mpErrorRepeat = MediaPlayer.create((this), R.raw.errorrepeat)
|
||||
restClient = ApiUtils.getAPIService()
|
||||
|
||||
listView = findViewById(R.id.listExpeditionSummary)
|
||||
textViewRoute = findViewById(R.id.textViewRoute)
|
||||
textAddressSelected = findViewById(R.id.textAddressSelected)
|
||||
textLoaded = findViewById(R.id.textLoaded)
|
||||
txtScan = findViewById(R.id.txtScan)
|
||||
layoutListView = findViewById(R.id.layoutListView)
|
||||
textAddressTitle = findViewById(R.id.textAddressTitle)
|
||||
|
||||
val bundle = intent.extras
|
||||
try {
|
||||
if (bundle != null) {
|
||||
route = bundle.getSerializable("route") as Ruta
|
||||
}
|
||||
routeOfLoad = route!!.id.toString()
|
||||
|
||||
} catch (e: Exception) {
|
||||
routeOfLoad = ""
|
||||
}
|
||||
|
||||
changeTitle(route = routeOfLoad)
|
||||
setEvents()
|
||||
|
||||
}
|
||||
|
||||
private fun changeTitle(route: String?) {
|
||||
textViewRoute!!.text = route
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
listExpeditionSummary.clear()
|
||||
expedition_getSummary()
|
||||
if (textAddressSelected!!.text.isNotEmpty()) {
|
||||
|
||||
checks
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun goToExpeditionByAddress(
|
||||
adress: String?,
|
||||
position: Int
|
||||
) {
|
||||
|
||||
//itemScaneed es para ver si se ha escaneado algo y es diferente los consignatarios
|
||||
positionSelected = position
|
||||
|
||||
if (itemScanned && !(textAddressSelected!!.text).equals(adress)) {
|
||||
|
||||
totalSend = 2
|
||||
Utils.progressBar.show(this, getResources().getString(R.string.please_wait))
|
||||
expeditionState_addByExpeditionMulti(listCheck
|
||||
.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }
|
||||
.filter { it.code == "ON DELIVERY" }, "ON DELIVERY"
|
||||
)
|
||||
|
||||
expeditionState_addByExpeditionMulti(listCheck
|
||||
.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }
|
||||
.filter { it.code != "ON DELIVERY" }, "LOST"
|
||||
)
|
||||
|
||||
itemScanned = false
|
||||
}
|
||||
|
||||
|
||||
textAddressTitle!!.visibility = View.VISIBLE
|
||||
textAddressSelected!!.text = adress
|
||||
|
||||
txtScan!!.visibility = View.VISIBLE
|
||||
txtScan!!.requestFocus()
|
||||
checks
|
||||
|
||||
}
|
||||
|
||||
private val checks: Unit
|
||||
get() {
|
||||
|
||||
val listDownload: ArrayList<Check> = ArrayList()
|
||||
|
||||
val that = this
|
||||
val idR = textViewRoute!!.text.toString()
|
||||
|
||||
val routeData: Array<String?> = arrayOfNulls(1)
|
||||
routeData[0] = idR
|
||||
|
||||
restClient!!.getExpeditionFromRoute(Utils.getMapWhitUser(this), routeData)
|
||||
.enqueue(object : Callback<List<Check>> {
|
||||
override fun onResponse(
|
||||
call: Call<List<Check>>,
|
||||
response: Response<List<Check>>
|
||||
) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
for (c in response.body()!!) {
|
||||
|
||||
|
||||
if (!c.code.isNullOrBlank()) {
|
||||
|
||||
if (c.code.equals("ON DELIVERY")) {
|
||||
c.checked = "1"
|
||||
}
|
||||
if (c.code.equals("DELIVERED")) {
|
||||
c.delivered = "1"
|
||||
}
|
||||
|
||||
}
|
||||
listDownload.add(c)
|
||||
|
||||
}
|
||||
|
||||
|
||||
LocalStorage.addExpeditionSave(that, listDownload)
|
||||
getLocalDataExpedition()
|
||||
|
||||
} else {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
that,
|
||||
that.resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<List<Check>>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
that,
|
||||
that.resources.getString(R.string.error_conexion)
|
||||
)
|
||||
getLocalDataExpedition()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
fun getLocalDataExpedition() {
|
||||
|
||||
|
||||
val list: List<Check> = LocalStorage.getExpeditions(this)
|
||||
listCheck = LocalStorage.getExpeditions(this)
|
||||
if (list.size > 0) {
|
||||
|
||||
totalChecks =
|
||||
list.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }.size
|
||||
checked =
|
||||
list.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }
|
||||
.filter { it.checked == "1" || it.code == "ON DELIVERY" }.size
|
||||
|
||||
textLoaded!!.text = checked.toString() + "/" + totalChecks.toString() + " cargadas"
|
||||
|
||||
|
||||
hideKeyboard()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun expedition_getSummary() {
|
||||
|
||||
|
||||
Utils.progressBar.show(this, resources.getString(R.string.please_wait))
|
||||
|
||||
val routeData: Array<String?> = arrayOfNulls(1)
|
||||
routeData[0] = routeOfLoad
|
||||
|
||||
restClient!!.route_getExpeditionSummary(Utils.getMapWhitUser(this), routeData)
|
||||
.enqueue(object : Callback<List<ExpeditionInfoSummary>> {
|
||||
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<ExpeditionInfoSummary>>,
|
||||
response: Response<List<ExpeditionInfoSummary>>
|
||||
) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
for (expedInfoSummary in response.body()!!) {
|
||||
|
||||
listExpeditionSummary.add(expedInfoSummary)
|
||||
|
||||
}
|
||||
if (listExpeditionSummary.isEmpty()) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivity,
|
||||
"No se ha encontrado información de la ruta"
|
||||
)
|
||||
}
|
||||
|
||||
setAdapter(listExpeditionSummary)
|
||||
|
||||
} else {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivity,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<List<ExpeditionInfoSummary>>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivity,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
private fun setEvents() {
|
||||
|
||||
txtScan!!.setOnEditorActionListener { _, _, _ ->
|
||||
Toast.makeText(this, "Expedición :" + txtScan!!.text, Toast.LENGTH_SHORT).show()
|
||||
findExpedition(txtScan!!.text.toString())
|
||||
itemScanned = true
|
||||
false
|
||||
}
|
||||
txtScan!!.onFocusChangeListener = OnFocusChangeListener { _, b ->
|
||||
|
||||
|
||||
if (b) {
|
||||
txtScan!!.setText("")
|
||||
}
|
||||
}
|
||||
|
||||
listView!!.setOnFocusChangeListener { _, _ ->
|
||||
txtScan!!.requestFocus()
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
|
||||
exit(findViewById(R.id.imageExit))
|
||||
|
||||
}
|
||||
|
||||
private fun findExpedition(textScanned: String) {
|
||||
|
||||
var position = listCheck.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.indexOfFirst { it.id == textScanned }
|
||||
|
||||
|
||||
if (position >= 0) {
|
||||
position = listCheck.indexOfFirst { it.id == textScanned }
|
||||
if (listCheck[position].code.equals("ON DELIVERY") && listCheck[position].addressFk.equals(
|
||||
textAddressSelected!!.text
|
||||
)
|
||||
) {
|
||||
mpErrorRepeat?.start()
|
||||
Toast.makeText(this, "Expedición ya cargada", Toast.LENGTH_SHORT).show()
|
||||
|
||||
} else {
|
||||
mpOk?.start()
|
||||
markExpeditionLoaded(position)
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
mpError?.start()
|
||||
}
|
||||
|
||||
txtScan!!.setText("")
|
||||
txtScan!!.requestFocus()
|
||||
|
||||
}
|
||||
|
||||
private fun markExpeditionLoaded(i: Int) {
|
||||
|
||||
listCheck[i].checked = "1"
|
||||
listCheck[i].code = "ON DELIVERY"
|
||||
checked += 1
|
||||
|
||||
textLoaded!!.text = "$checked/$totalChecks cargadas"
|
||||
if (checked >= totalChecks) {
|
||||
totalSend = 1
|
||||
Utils.progressBar.show(this, getResources().getString(R.string.please_wait))
|
||||
expeditionState_addByExpeditionMulti(listCheck
|
||||
.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }
|
||||
.filter { it.code == "ON DELIVERY" }, "ON DELIVERY"
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
txtScan!!.setText("")
|
||||
txtScan!!.requestFocus()
|
||||
hideKeyboard()
|
||||
|
||||
}
|
||||
|
||||
private fun expeditionState_addByExpeditionMulti(expeditions: List<Check>, state: String) {
|
||||
val stateData: Array<Any?> = arrayOfNulls(2)
|
||||
|
||||
stateData[0] = expeditions
|
||||
stateData[1] = state
|
||||
|
||||
|
||||
restClient!!.expeditionState_addByExpeditionMulti(Utils.getMapWhitUser(this), stateData)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
|
||||
if (response.isSuccessful) {
|
||||
totalSendSuccessful = totalSendSuccessful + 1
|
||||
itemScanned = false
|
||||
|
||||
if (totalSend == totalSendSuccessful) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Toast.makeText(
|
||||
this@ExpeditionSummaryActivity,
|
||||
"Consignatario cargado",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
totalSend = 0
|
||||
totalSendSuccessful = 0
|
||||
checkNextAddress(totalSendSuccessful)
|
||||
// onResume()
|
||||
}
|
||||
} else {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivity,
|
||||
resources.getString(R.string.error_conexion) + ".Vuelva a intentarlo"
|
||||
|
||||
)
|
||||
txtScan!!.requestFocus()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivity,
|
||||
resources.getString(R.string.error_conexion) + ".Vuelva a intentarlo"
|
||||
)
|
||||
txtScan!!.requestFocus()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun checkNextAddress(totalSendSuccessful: Int) {
|
||||
|
||||
|
||||
if (listExpeditionSummary.size >= positionSelected!! + 1) {
|
||||
textAddressSelected!!.text = listExpeditionSummary.get(positionSelected!! + 1).address
|
||||
positionSelected = positionSelected!! + 1
|
||||
|
||||
}
|
||||
onResume()
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun Activity.hideKeyboard() {
|
||||
hideKeyboard(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Context.hideKeyboard(view: View) {
|
||||
val inputMethodManager =
|
||||
getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
|
||||
fun setAdapter(listInfo: ArrayList<ExpeditionInfoSummary>) {
|
||||
adapter = ExpeditionSummaryAdapter(
|
||||
this,
|
||||
listInfo
|
||||
)
|
||||
this.listView!!.adapter = adapter
|
||||
adapter!!.notifyDataSetChanged()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun exit(view: View) {
|
||||
|
||||
if (itemScanned && textAddressSelected!!.text.isNotEmpty()) {
|
||||
totalSend = 2
|
||||
Utils.progressBar.show(this, getResources().getString(R.string.please_wait))
|
||||
expeditionState_addByExpeditionMulti(listCheck
|
||||
.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }
|
||||
.filter { it.code == "ON DELIVERY" }, "ON DELIVERY"
|
||||
)
|
||||
|
||||
expeditionState_addByExpeditionMulti(listCheck
|
||||
.filter { it.addressFk == textAddressSelected!!.text }
|
||||
.filter { it.routeFk == textViewRoute!!.text }
|
||||
.filter { it.code != "ON DELIVERY" }, "LOST"
|
||||
)
|
||||
|
||||
itemScanned = false
|
||||
}
|
||||
|
||||
|
||||
finish()
|
||||
}
|
||||
|
||||
fun onLoadSelected(view: View) {
|
||||
val i = Intent(this, LoadVanActivity::class.java)
|
||||
i.putExtra("route", route)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
fun gotoShowExpeditions(address: String, route: String) {
|
||||
|
||||
val i = Intent(this, LoadVanActivity::class.java)
|
||||
i.putExtra("adress", address)
|
||||
i.putExtra("routeId", route)
|
||||
startActivity(i)
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,201 @@
|
|||
package verdnatura.es.repartoverdnatura
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.EditText
|
||||
import android.widget.ListView
|
||||
import android.widget.TextView
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import verdnatura.es.repartoverdnatura.ADAPTERS.ExpeditionSummaryAdapter
|
||||
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient
|
||||
import verdnatura.es.repartoverdnatura.MODELS.ExpeditionInfoSummary
|
||||
import verdnatura.es.repartoverdnatura.MODELS.Ruta
|
||||
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils
|
||||
import verdnatura.es.repartoverdnatura.UTILS.Utils
|
||||
|
||||
|
||||
class ExpeditionSummaryActivityOld : AppCompatActivity() {
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
|
||||
var listExpeditionSummary = ArrayList<ExpeditionInfoSummary>()
|
||||
var adapter: ExpeditionSummaryAdapter? = null
|
||||
var listView: ListView? = null
|
||||
private var restClient: RestClient? = null
|
||||
var txtRuta: EditText? = null
|
||||
var routeOfLoad:String?=null
|
||||
var route:Ruta? = null
|
||||
|
||||
var txtIdRuta: TextView? = null
|
||||
var textViewTitle: TextView? = null
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_expedition_summary)
|
||||
mperror = MediaPlayer.create((this), R.raw.error)
|
||||
mpok = MediaPlayer.create((this), R.raw.ok)
|
||||
restClient = ApiUtils.getAPIService()
|
||||
|
||||
listView = findViewById(R.id.listExpeditionSummary)
|
||||
textViewTitle = findViewById(R.id.textViewRoute)
|
||||
val bundle = intent.extras
|
||||
try {
|
||||
route = bundle.getSerializable("route") as Ruta
|
||||
routeOfLoad = route!!.id.toString()
|
||||
|
||||
|
||||
} catch (e: Exception) {
|
||||
routeOfLoad=""
|
||||
}
|
||||
changeTitle(route = routeOfLoad)
|
||||
/* txtRuta = findViewById(R.id.txtRuta)
|
||||
txtIdRuta = findViewById(R.id.textView41)
|
||||
textViewTitle = findViewById(R.id.textViewTitle)*/
|
||||
|
||||
setEvents()
|
||||
|
||||
}
|
||||
|
||||
private fun changeTitle(route: String?) {
|
||||
textViewTitle!!.text=route
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
listExpeditionSummary.clear()
|
||||
expedition_getSummary()
|
||||
}
|
||||
|
||||
fun goToExpeditionByAddress(adress: String?, idRoute: String?) {
|
||||
val i = Intent(this, LoadVanActivity::class.java)
|
||||
i.putExtra("adress", adress)
|
||||
i.putExtra("routeId", idRoute)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
private fun expedition_getSummary() {
|
||||
|
||||
|
||||
Utils.progressBar.show(this, resources.getString(R.string.please_wait))
|
||||
|
||||
val routeData: Array<String?> = arrayOfNulls(1)
|
||||
routeData[0] = routeOfLoad
|
||||
|
||||
restClient!!.route_getExpeditionSummary(Utils.getMapWhitUser(this),routeData)
|
||||
.enqueue(object : Callback<List<ExpeditionInfoSummary>> {
|
||||
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<ExpeditionInfoSummary>>,
|
||||
response: Response<List<ExpeditionInfoSummary>>
|
||||
) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
if (response.isSuccessful) {
|
||||
for (expedInfoSummary in response.body()!!) {
|
||||
|
||||
listExpeditionSummary.add(expedInfoSummary)
|
||||
|
||||
}
|
||||
if (listExpeditionSummary.isEmpty()) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivityOld,
|
||||
"No se ha encontrado información de la ruta"
|
||||
)}
|
||||
|
||||
|
||||
setAdapter(listExpeditionSummary)
|
||||
|
||||
}else{
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivityOld,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<List<ExpeditionInfoSummary>>, t: Throwable) {
|
||||
Utils.progressBar.dialog.dismiss()
|
||||
Utils.showErrorDialog(
|
||||
this@ExpeditionSummaryActivityOld,
|
||||
resources.getString(R.string.error_conexion)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
private fun setEvents() {
|
||||
|
||||
|
||||
|
||||
/* txtRuta!!.setOnEditorActionListener { textView, i, keyEvent ->
|
||||
Utils.progressBar.show(this,getResources().getString(R.string.please_wait))
|
||||
expedition_getLog(txtRuta!!.text.toString())
|
||||
textViewTitle!!.setText("Ver log expedición :" + txtRuta!!.text.toString())
|
||||
txtRuta!!.setText("")
|
||||
hideKeyboard()
|
||||
false
|
||||
}
|
||||
*/
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
listView!!.setOnScrollChangeListener{view,a,b,c,d->
|
||||
|
||||
listView!!.invalidateViews()
|
||||
false
|
||||
}
|
||||
}
|
||||
/*listView!!.setOnFocusChangeListener { view, b ->
|
||||
|
||||
false
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
fun Activity.hideKeyboard() {
|
||||
hideKeyboard(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Context.hideKeyboard(view: View) {
|
||||
val inputMethodManager =
|
||||
getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
|
||||
fun setAdapter(listInfo: ArrayList<ExpeditionInfoSummary>) {
|
||||
adapter = ExpeditionSummaryAdapter(
|
||||
this,
|
||||
listInfo
|
||||
)
|
||||
this.listView!!.adapter = adapter
|
||||
adapter!!.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
||||
fun exit(view: View) {
|
||||
|
||||
finish()
|
||||
}
|
||||
|
||||
fun onLoadSelected(view: View) {
|
||||
val i = Intent(this, LoadVanActivity::class.java)
|
||||
i.putExtra("route", route)
|
||||
startActivity(i)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package verdnatura.es.repartoverdnatura.INTERFACES;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.HeaderMap;
|
||||
import retrofit2.http.POST;
|
||||
import verdnatura.es.repartoverdnatura.MODELS.LoginSalix;
|
||||
|
||||
|
||||
|
||||
public interface RestClientSalix{
|
||||
|
||||
@POST("/api/Accounts/login")
|
||||
Call<LoginSalix> loginSalix(@HeaderMap Map<String,String> headers, @Body LoginSalix userData);
|
||||
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
package verdnatura.es.repartoverdnatura.MODELS;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Expedition implements Serializable {
|
||||
|
||||
|
||||
@SerializedName("Id")
|
||||
private String Id;
|
||||
@SerializedName("Ticket")
|
||||
private String Ticket;
|
||||
@SerializedName("Ticket")
|
||||
private String isChecked;
|
||||
|
||||
|
||||
/*
|
||||
@SerializedName("Id")
|
||||
private String Id;
|
||||
@SerializedName("Hour")
|
||||
private String Hour;
|
||||
@SerializedName("Date")
|
||||
private String Date;
|
||||
@SerializedName("M3")
|
||||
private String M3;
|
||||
@SerializedName("Plate")
|
||||
private String Plate;
|
||||
@SerializedName("Agency")
|
||||
private String Agency;
|
||||
@SerializedName("Driver")
|
||||
private String Driver;
|
||||
@SerializedName("kmStart")
|
||||
private String kmStart;
|
||||
@SerializedName("kmEnd")
|
||||
private String kmEnd;
|
||||
@SerializedName("dStart")
|
||||
private String dStart;
|
||||
@SerializedName("dEnd")
|
||||
private String dEnd;
|
||||
@SerializedName("Chofer")
|
||||
private String Chofer;*/
|
||||
|
||||
private Boolean isHeader = false;
|
||||
|
||||
public Expedition(String id, String ticket, String isChecked) {
|
||||
Id = id;
|
||||
Ticket = ticket;
|
||||
isChecked=isChecked;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* public Expedition(String id, String hour, String date, String m3, String plate, String agency, String driver, String kmStart, String kmEnd, String dStart, String dEnd, String chofer) {
|
||||
Id = id;
|
||||
Hour = hour;
|
||||
Date = date;
|
||||
M3 = m3;
|
||||
Plate = plate;
|
||||
Agency = agency;
|
||||
Driver = driver;
|
||||
this.kmStart = kmStart;
|
||||
this.kmEnd = kmEnd;
|
||||
this.dStart = dStart;
|
||||
this.dEnd = dEnd;
|
||||
Chofer = chofer;
|
||||
}*/
|
||||
|
||||
public Expedition(){}
|
||||
|
||||
public Boolean getHeader() {
|
||||
return isHeader;
|
||||
}
|
||||
|
||||
public void setHeader(Boolean header) {
|
||||
isHeader = header;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
Id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*public String getHour() {
|
||||
return Hour;
|
||||
}
|
||||
|
||||
public void setHour(String hour) {
|
||||
Hour = hour;
|
||||
}
|
||||
|
||||
public String getDate() {
|
||||
return Date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
Date = date;
|
||||
}
|
||||
|
||||
public String getM3() {
|
||||
return M3;
|
||||
}
|
||||
|
||||
public void setM3(String m3) {
|
||||
M3 = m3;
|
||||
}
|
||||
|
||||
public String getPlate() {
|
||||
return Plate;
|
||||
}
|
||||
|
||||
public void setPlate(String plate) {
|
||||
Plate = plate;
|
||||
}
|
||||
|
||||
public String getAgency() {
|
||||
return Agency;
|
||||
}
|
||||
|
||||
public void setAgency(String agency) {
|
||||
Agency = agency;
|
||||
}
|
||||
|
||||
public String getDriver() {
|
||||
return Driver;
|
||||
}
|
||||
|
||||
public void setDriver(String driver) {
|
||||
Driver = driver;
|
||||
}
|
||||
|
||||
public String getKmStart() {
|
||||
return kmStart;
|
||||
}
|
||||
|
||||
public void setKmStart(String kmStart) {
|
||||
this.kmStart = kmStart;
|
||||
}
|
||||
|
||||
public String getKmEnd() {
|
||||
return kmEnd;
|
||||
}
|
||||
|
||||
public void setKmEnd(String kmEnd) {
|
||||
this.kmEnd = kmEnd;
|
||||
}
|
||||
|
||||
public String getdStart() {
|
||||
return dStart;
|
||||
}
|
||||
|
||||
public void setdStart(String dStart) {
|
||||
this.dStart = dStart;
|
||||
}
|
||||
|
||||
public String getdEnd() {
|
||||
return dEnd;
|
||||
}
|
||||
|
||||
public void setdEnd(String dEnd) {
|
||||
this.dEnd = dEnd;
|
||||
}
|
||||
|
||||
public String getChofer() {
|
||||
return Chofer;
|
||||
}
|
||||
|
||||
public void setChofer(String chofer) {
|
||||
Chofer = chofer;
|
||||
}*/
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package verdnatura.es.repartoverdnatura.MODELS
|
||||
|
||||
|
||||
class ExpeditionInfoLog {
|
||||
|
||||
|
||||
var description: String? = null
|
||||
|
||||
var name: String? = null
|
||||
|
||||
var created: String? = null
|
||||
|
||||
|
||||
}
|
||||
|
||||
class ExpeditionInfoSummary {
|
||||
|
||||
var route: Int? = null
|
||||
var address: String? = null
|
||||
var itemPackingType: String? = null
|
||||
var total: Int? = 0
|
||||
var delivery: String? = null
|
||||
var lost: String? = null
|
||||
var delivered: String? = null
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package verdnatura.es.repartoverdnatura.MODELS
|
||||
|
||||
class LoginSalix(
|
||||
val user: String = "",
|
||||
val password: String = "",
|
||||
val token: String = "",
|
||||
var isError: Boolean = false,
|
||||
var errorMessage: String = ""
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
package verdnatura.es.repartoverdnatura.MODELS
|
||||
|
||||
class SectorItem (
|
||||
var id: Int,
|
||||
var description:String = "des",
|
||||
val warehouseFk:Int?,
|
||||
val isError : Boolean = false,
|
||||
var errorMessage : String = ""
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
package verdnatura.es.repartoverdnatura.UTILS;
|
||||
|
||||
import verdnatura.es.repartoverdnatura.INTERFACES.RestClientSalix;
|
||||
|
||||
public class ApiUtilsSalix {
|
||||
private ApiUtilsSalix() {}
|
||||
|
||||
// public static final String BASE_URL_SALIX = "https://salix.verdnatura.es/";
|
||||
public static final String BASE_URL_SALIX = "https://test-salix.verdnatura.es/";
|
||||
//public static final String BASE_URL_SALIX = "http://localhost:3000/";
|
||||
public static RestClientSalix getAPIService() {
|
||||
return RetrofitClientSalix.getClient(BASE_URL_SALIX).create(RestClientSalix.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package verdnatura.es.repartoverdnatura.UTILS;
|
||||
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
public class RetrofitClientSalix {
|
||||
private static Retrofit retrofit = null;
|
||||
|
||||
public static Retrofit getClient(String baseUrl){
|
||||
if (retrofit==null) {
|
||||
retrofit = new Retrofit.Builder()
|
||||
.baseUrl(baseUrl)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build();
|
||||
}
|
||||
return retrofit;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<vector android:height="24dp"
|
||||
android:viewportHeight="50"
|
||||
android:viewportWidth="50"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFF" android:pathData="M25,18.2c-3.8,0 -6.8,3.1 -6.8,6.8s3.1,6.8 6.8,6.8s6.8,-3.1 6.8,-6.8S28.8,18.2 25,18.2M25,36.4c-6.3,0 -11.4,-5.1 -11.4,-11.4S18.7,13.6 25,13.6S36.4,18.7 36.4,25S31.3,36.4 25,36.4M25,8C13.6,8 3.9,15 0,25c3.9,10 13.6,17 25,17S46.1,35 50,25C46.1,15 36.4,8 25,8z"/>
|
||||
</vector>
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -0,0 +1,8 @@
|
|||
<!-- drawable/check_outline.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#FFF" android:pathData="M19.78,2.2L24,6.42L8.44,22L0,13.55L4.22,9.33L8.44,13.55L19.78,2.2M19.78,5L8.44,16.36L4.22,12.19L2.81,13.55L8.44,19.17L21.19,6.42L19.78,5Z" />
|
||||
</vector>
|
|
@ -0,0 +1,8 @@
|
|||
<!-- drawable/archive_search_outline.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#FFF" android:pathData="M13.04 10C12.64 10.25 12.26 10.55 11.9 10.9C11.57 11.24 11.27 11.61 11.03 12H8V10.5C8 10.22 8.22 10 8.5 10H13.04M20 8H2V2H20V8M18 4H4V6H18V4M5 18V9H3V20H11.82C11.24 19.4 10.8 18.72 10.5 18H5M23.39 21L22 22.39L18.88 19.32C18.19 19.75 17.37 20 16.5 20C14 20 12 18 12 15.5S14 11 16.5 11 21 13 21 15.5C21 16.38 20.75 17.21 20.31 17.9L23.39 21M19 15.5C19 14.12 17.88 13 16.5 13S14 14.12 14 15.5 15.12 18 16.5 18 19 16.88 19 15.5Z" />
|
||||
</vector>
|
|
@ -0,0 +1,8 @@
|
|||
<vector
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFF" android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>
|
||||
</vector>
|
|
@ -0,0 +1,8 @@
|
|||
<!-- drawable/pencil_outline.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#FFF" android:pathData="M14.06,9L15,9.94L5.92,19H5V18.08L14.06,9M17.66,3C17.41,3 17.15,3.1 16.96,3.29L15.13,5.12L18.88,8.87L20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18.17,3.09 17.92,3 17.66,3M14.06,6.19L3,17.25V21H6.75L17.81,9.94L14.06,6.19Z" />
|
||||
</vector>
|
|
@ -0,0 +1,14 @@
|
|||
<!-- drawable/barcode_scan.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tint="#FFF"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
>
|
||||
|
||||
<path android:pathData="M21 11.11V5C21 3.9 20.11 3 19 3H14.82C14.4 1.84 13.3 1 12 1S9.6 1.84 9.18 3H5C3.9 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H11.11C12.37 22.24 14.09 23 16 23C19.87 23 23 19.87 23 16C23 14.09 22.24 12.37 21 11.11M12 3C12.55 3 13 3.45 13 4S12.55 5 12 5 11 4.55 11 4 11.45 3 12 3M6 7H18V9H6V7M9.08 17H6V15H9.08C9.03 15.33 9 15.66 9 16S9.03 16.67 9.08 17M6 13V11H11.11C10.5 11.57 10.04 12.25 9.68 13H6M16 21C13.24 21 11 18.76 11 16S13.24 11 16 11 21 13.24 21 16 18.76 21 16 21M16.5 16.25L19.36 17.94L18.61 19.16L15 17V12H16.5V16.25Z" android:fillColor="#000"/>
|
||||
|
||||
|
||||
|
||||
</vector>
|
|
@ -0,0 +1,217 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ExpeditionInfoActivity"
|
||||
android:background="@color/colorPrimaryDark">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorMainHeader"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="Ver log expedición"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/switchDescrip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Marcar encontrada"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/textViewTitle"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<Switch
|
||||
android:id="@+id/switchFound"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="48dp"
|
||||
android:checked="false"
|
||||
android:minHeight="48dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/switchDescrip"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageExit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:padding="5dp"
|
||||
android:onClick="exit"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/exit" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtScanned"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:textSize="13sp"
|
||||
android:hint="Escanea expedición para ver log o marcarla encontrada "
|
||||
android:inputType="textPersonName"
|
||||
android:minHeight="48dp"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textColorHint="@color/colorGray" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/allRoute"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@color/verdnatura_pumpkin_orange"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/idRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Ruta"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agencyRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Agencia"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/plateRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Matrícula"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dateRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Fecha"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timeRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Hora"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageLoadVan"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="onLoadSelected"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageExit"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/camion" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/txtDescriptions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCreated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:text="Fecha"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtNameWorker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Trabajador"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Estado"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listExpeditionInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,244 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
tools:context=".ExpeditionSummaryActivity">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorMainHeader"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="R:"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewRoute"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text=""
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textViewTitle"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textAddressTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="C:"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textViewRoute"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textAddressSelected"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text=""
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textAddressTitle"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textLoaded"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="Para cargar pulsa consignatario"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="@dimen/text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textAddressSelected"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageLoadVan"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="onLoadSelected"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageExit"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/camion" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageExit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:onClick="exit"
|
||||
android:padding="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/exit" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutListView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtScan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="Escanear expedición"
|
||||
android:inputType="text"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textColorHint="@color/colorGray"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtScanned"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="Escanear expedición"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textColorHint="@color/colorGray"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/txtDescriptions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtConsignatario"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Consign"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:text="Ruta"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtBox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Cajas"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtPacking"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Tipo"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtSc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Escan"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtLost"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Perdidas"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtDelivered"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Entregadas"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listExpeditionSummary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/row_expedition_summary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".LoadVanActivity"
|
||||
android:background="@color/colorPrimaryDark">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorMainHeader"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="@string/loadbultos"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtLineas"
|
||||
android:layout_width="139dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="0/0 lines"
|
||||
android:textColor="@color/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageVanLoaded"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:padding="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/check" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchLoad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="48dp"
|
||||
android:checked="true"
|
||||
android:minHeight="48dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/textView3"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView41"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/esccaneaEtiqueta"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtRuta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="esperando escaner"
|
||||
android:inputType="textPersonName"
|
||||
android:minHeight="48dp"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textColorHint="@color/colorGray" />
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listRoute"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<EditText
|
||||
android:id="@+id/txtEscaner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName"
|
||||
android:textColor="@color/colorAccent" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ExpeditionScanActivity"
|
||||
android:background="@color/colorPrimaryDark">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorMainHeader"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="Escanear expedición encontrada"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageVanLoaded"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:padding="5dp"
|
||||
android:onClick="exit()"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/exit"
|
||||
/>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchLoad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="48dp"
|
||||
android:checked="true"
|
||||
android:minHeight="48dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/textView3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView41"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Escanea expedición encontrada"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtRuta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="Escanear expedición"
|
||||
android:inputType="textPersonName"
|
||||
android:minHeight="48dp"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textColorHint="@color/colorGray" />
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listRoute"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fondo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/colorMainHeader"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCreated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="698658"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtNameWorker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="698658"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="698658"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Almacén: "
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtWarehouse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SILLA FV"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Bultos: "
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtBulto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="5"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fondo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/verdnatura_pumpkin_orange"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingLeft="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtConsignatario"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="8319"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtRoute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="126584"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtTotal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="10"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/txtPacking"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="3(H)"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/txtScanned"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="10"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/txtLost"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="2"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/txtDelivered"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="2"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<ImageView
|
||||
android:id="@+id/showExp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:onClick="onLoadSelected"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageExit"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/camion" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fondo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/colorMainHeader"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView44"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Expedición : "
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="698658"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/consignatarioId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Encontrada"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,192 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/colorMainHeader">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/darkclear"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/linearLayout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtDriver"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="--"
|
||||
android:textColor="@color/colorMainBg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView11"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="44393"
|
||||
android:textColor="@color/colorMainBg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView19"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="@string/hora"
|
||||
android:textColor="@color/colorGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView15"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="09:00"
|
||||
android:textColor="@color/colorMainBg" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="Zona20 MADRID"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="@string/numero_paleta"
|
||||
android:textColor="@color/colorGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="1695-DSY"
|
||||
android:textColor="@color/colorMainBg" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="@string/m3"
|
||||
android:textColor="@color/colorGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtM3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="0.0"
|
||||
android:textColor="@color/colorMainBg" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnCargadores"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="@string/cargadores"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageLoadVan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
app:srcCompat="@drawable/camion"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/loadVanTxt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="Escáner reparto"
|
||||
android:textColor="@color/colorPrimary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtOnline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/roboto"
|
||||
android:text="@string/no_disponible"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorGray"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fondo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/colorMainHeader"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView44"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ruta: "
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="698658"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/expediciones"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Expediciones: "
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtAddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="69"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Checked: "
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCheck"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorMainBg"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="text_size">10sp</dimen>
|
||||
</resources>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="text_size">12sp</dimen>
|
||||
</resources>
|
Loading…
Reference in New Issue