Skip to content

Instantly share code, notes, and snippets.

View ParisaRashidi's full-sized avatar

parisa_rashidi ParisaRashidi

View GitHub Profile
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
$$
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);
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;
@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));
@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