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
create or replace function point_distributor(latitudePoint1 double precision , | |
latitudePoint2 double precision, | |
longitudePoint1 double precision, | |
longitudePoint2 double precision, | |
x integer,--the length | |
y integer -- the width | |
) RETURNS void | |
language plpgsql | |
as | |
$$ |
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 void requesSecondPage() { | |
RequestQueue queue = Volley.newRequestQueue(this); | |
String url = "http://leyliomajnoonapp.ir/panel/ws1.php?type=type=items&start=0&catid=\"+value+\"&id=0&total=10"; | |
StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
Toast.makeText(SecondPage.this, "the response of second page is :" + response, Toast.LENGTH_LONG).show(); | |
Log.d(TAG, "Response " + response); | |
Gson mGson = new Gson(); | |
ContentAnswer contentAnswer = mGson.fromJson((response), ContentAnswer.class); |
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
class RecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements View.OnTouchListener { | |
private ArrayList<BarcodeInformation> allBarcodeScans; | |
private ManageImageBarcode manageImageBarcode; | |
private Context myContext; | |
public RecyclerAdapter(Context context, ArrayList<BarcodeInformation> barcodeScanList){ | |
myContext=context; | |
allBarcodeScans = barcodeScanList; |
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
@Override | |
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { | |
((ItemViewHolder) holder).textViewTitle.setText(allBarcodeScans.get(position).getBarcodeScanDate()); | |
String barcodeImageName=allBarcodeScans.get(position).getBarcodeImageTitle(); | |
if (manageImageBarcode.readImageBarcodeFromExternalStorage(barcodeImageName)==null) | |
((ItemViewHolder) holder).imageViewBarcodeImage.setImageResource(R.mipmap.ic_launcher); | |
else | |
((ItemViewHolder) holder).imageViewBarcodeImage.setImageBitmap(manageImageBarcode.readImageBarcodeFromExternalStorage(barcodeImageName)); |
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
@Override | |
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); | |
barcodeScanRecyclerView = (RecyclerView) view.findViewById(R.id.recycler); | |
pinterestView = (PinterestView) view.findViewById(R.id.pin_view); | |
pinterestView.addMenuItem(createChildView(R.mipmap.spinner_frame_8_96px, "loading") | |
, createChildView(R.mipmap.delete, "delete"), createChildView(R.drawable.delete_this_barcode, "link") | |
, createChildView(R.mipmap.share_96px, "share")); | |
pinterestView.setPinClickListener(new PinterestView.PinMenuClickListener() { | |
@Override |