Skip to content

Instantly share code, notes, and snippets.

View ibrahimAlii's full-sized avatar

Ibrahim ali abdelghany ibrahimAlii

View GitHub Profile
val query = Storefront.query {
it.shop {
it.paymentSettings { it.cardVaultUrl() }
}
}
val call = Client.getGraphClient(requireContext()).queryGraph(query)
call.enqueue {
if (it is GraphCallResult.Success) {

Keybase proof

I hereby claim:

  • I am ibrahimalii on github.
  • I am ibrahimali (https://keybase.io/ibrahimali) on keybase.
  • I have a public key ASCl1p4RNWFYNaWbdWAJtXesIQLYKj2Xvx7qHXSgpogpkQo

To claim this, I am signing this object:

@ibrahimAlii
ibrahimAlii / DynamicSpinner.java
Created April 9, 2018 12:47
A Dynamic Spinner Class, for creating dynamic spinner based on web-service response
package com.egpay.staff.activities.registration;
import android.content.Context;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
MyView myView;
Rect rectangle = new Rect(0, 0, 100, 100);
float oldX[] = new float[2], oldY[] = new float[2];
float newX[] = new float[2], newY[] = new float[2];
int numberOfFingers = 0;
DisplayMetrics metrics = new DisplayMetrics();
int xChange[] = new int[2], yChange[] = new int[2];
int diffX, diffY;
int newLeft = rectangle.left, newTop = rectangle.top,
newRight = rectangle.right,
import android.Manifest;
import android.app.AlertDialog;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;
import android.bluetooth.BluetoothManager;
import android.bluetooth.le.BluetoothLeScanner;
public class ExpandableListAdapter extends BaseExpandableListAdapter {
private Context _context;
private List<String> _listDataHeader; // header titles
// child data in format of header title, child title
private HashMap<String, List<String>> _listDataChild;
private static final String TAG = "ExpandableListAdapter";
Activity activity;
public ExpandableListAdapter(Context context, List<String> listDataHeader,
public class HttpService extends IntentService {
Context context;
String id;
public void HttpService(Context context){
this.context = context;
}
private static String TAG = HttpService.class.getSimpleName();
// SharedPreferences prefs = context.getSharedPreferences("idVeriFy", MODE_PRIVATE);
// String id = prefs.getString("idverify", "");
@ibrahimAlii
ibrahimAlii / UploadActivity
Created March 26, 2017 08:12
Select images from gallery and upload them.
public class UploadActivity extends Activity {
// LogCat tag
private static final String TAG = ImagesForAds.class.getSimpleName();
// private ProgressBar progressBar;
// private String filePath = null;
// private TextView txtPercentage;
// private ImageView imgPreview;
// private VideoView vidPreview;
// private Button btnUpload;
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "elryad.harajsooq"
minSdkVersion 15