Skip to content

Instantly share code, notes, and snippets.

Avatar

thepoosh yishai-glide

  • Glide
  • Jerusalem IL
View GitHub Profile
View list.java
mList.setOnScrollListener(new OnScrollListener() {
List<ViewPropertyAnimator> animations = new ArrayList<ViewPropertyAnimator>();
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (scrollState == SCROLL_STATE_IDLE) {
int firstVisiblePosition = view.getFirstVisiblePosition();
int lastVisiblePosition = view.getLastVisiblePosition();
for(int i = lastVisiblePosition; i >= firstVisiblePosition; i--) {
View Alerts.java
public class Alerts {
class Alert {
byte cell_id;
byte type;
Calendar start_datetime = new GregorianCalendar();
byte duration;
byte data1;
}
View read.java
public class MainActivity extends ActivityCompat {
/*
* ACTIVITY CODE
*/
public String getStiredValue() {
SharedPreferences prefs = context.getSharedPreferences(PREFS, MODE_PRIVATE);
return prefs.getString(KEY, DEF_VALUE);
}
View FirebaseInitProvider.Java
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.google.firebase.provider;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
View wut.java
final AlertDialog dialog = builder.create();
dialog.setOnShowListener( new OnShowListener() {
@Override
public void onShow(DialogInterface arg0) {
dialog.getButton(AlertDialog.BUTTON_POSITIVE);
dialog.getButton(AlertDialog.BUTTON_NEGATIVE);
}
});
View sample.java
public void addItem(ergebnisseListView item, int location) {
if(location > 0 && location < listData.size()) {
listData.add(item, location);
} else {
listData.add(item);
}
notifyDatasetChanged();
}
public void addItem(ergebnisseListView item) {
View rickroll.sh
#!/bin/bash
# Rick Astley in your Terminal.
# By Serene Han and Justine Tunney <3
version='1.1'
rick='http://keroserene.net/lol'
video="$rick/astley80.full.bz2"
# TODO: I'll let someone with mac or windows machine send a pull request
# to get gsm going again :)
audio_gsm="$rick/roll.gsm"
audio_raw="$rick/roll.s16"
View A.java
package org.teamsik.apps.hackingchallenge;
import android.content.Context;
import android.util.Base64;
public abstract class a
{
public static boolean a(Context paramContext, String paramString)
{
byte[] arrayOfByte1 = a(paramString);
View register.java
public synchronized static void registerService(Context applicationContext) {
Intent serviceIntent = new Intent(applicationContext, GcmRegistrationService.class);
PendingIntent scheduleIntetnt = PendingIntent.getService(GlideApplication.applicationContext, REQUEST_CODE, serviceIntent, PendingIntent.FLAG_UPDATE_CURRENT);
if (scheduleIntetnt == null) {
if(DEBUG) {
Utils.log(TAG, "no need to schedule again since there is already a PendingIntent in the queue", 1);
}
return;
}
long now = System.currentTimeMillis();