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
dependencies { | |
compile 'com.kbeanie:image-chooser-library:1.4.4@aar' | |
compile 'com.soundcloud.android:android-crop:1.0.1@aar' | |
} |
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
/** | |
* get android id of device. | |
* | |
* @param context app context | |
* @return android id | |
*/ | |
public static String getAndroidID(Context context) { | |
if (context != null) { | |
return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); | |
} else { |
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
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
/** | |
* Created by DSK02 on 1/27/2016. | |
*/ | |
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public static String TAG = "EndlessRecycler"; | |
private int previousTotal = 0; // The total number of items in the dataset after the last load |
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
#include <stdio.h> | |
int main(void) { | |
int i,j,rows; | |
printf("Enter the nth number of series: "); | |
scanf("%d",&rows); | |
printf("\n"); | |
for(i=1;i<=rows;++i) | |
{ | |
for(j=1;j<=i;++j) |
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
import android.app.DatePickerDialog; | |
import android.content.Context; | |
import android.os.Build; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.DatePicker; | |
import java.util.Calendar; | |
import jp.likenote.android.R; |
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
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.ViewGroup; | |
import android.widget.GridView; | |
public class ExpandableHeightGridView extends GridView { | |
boolean expanded = false; | |
public ExpandableHeightGridView(Context context) { |
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 ImagePicker imagePicker; | |
// init | |
imagePicker = new ImagePicker(getActivity(), new ImageChooserListener() { | |
@Override | |
public void onImageChosen(final ChosenImage chosenImage) { | |
getActivity().runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
filePath = chosenImage.getFileThumbnail(); |
NewerOlder