This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************** | |
//Navigate to DVC1 !!! | |
//******************** | |
namespace EMALI | |
{ | |
public partial class vPtoVentaTipo : DialogViewController | |
{ | |
public int PaginaIndex { get; set; } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void ViewWillDisappear (bool animated) | |
{ | |
base.ViewWillDisappear (animated); | |
//use AtmHud ActivityView | |
MUI.MuestraCursor ("Cargando Articulos..."); | |
ThreadPool.QueueUserWorkItem ((ee) => { | |
//That method is late 6 seconds | |
call database method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override View GetView(int position, View convertView, ViewGroup parent) | |
{ | |
View row; | |
AdapterArticuloConsultaItem item; | |
TextView lbTexto; | |
ProgressBar pbImagen; | |
ImageView ivImagen; | |
if (convertView == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override View GetView(int position, View convertView, ViewGroup parent) | |
{ | |
ViewHolder holder; | |
AdapterArticuloConsultaItem item; | |
string path; | |
bool encontrado = false; | |
Bitmap bMap = null; | |
if (convertView == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//decodes image and scales it to reduce memory consumption | |
private Bitmap decodeFile(File f){ | |
try { | |
//Decode image size | |
BitmapFactory.Options o = new BitmapFactory.Options(); | |
o.inJustDecodeBounds = true; | |
BitmapFactory.decodeStream(new FileInputStream(f),null,o); | |
//The new size we want to scale to | |
final int REQUIRED_SIZE=70; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick-and-dirty (and untested!) port of https://gist.github.com/3169945 to C# | |
Bitmap DecodeFile (string path) | |
{ | |
var opts = new BitmapFactory.Options () { | |
InJustDecodeBounds = true, | |
}; | |
using (var b = BitmapFactory.DecodeFile (path, opts)) { | |
// Ignore; we're filling `opts` | |
} | |
const int RequiredSize = 70; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class ViewHolder : Java.Lang.Object | |
{ | |
public TextView lbCodigo; | |
public TextView lbNombre; | |
public TextView lbPrecio; | |
public ProgressBar pbImagen; | |
public ImageView ivImagen; | |
public int position; | |
} |