This file contains hidden or 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
#Enable daemon | |
org.gradle.daemon=true | |
# Try and findout the best heap size for your project build. | |
org.gradle.jvmargs=-Xmx3096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | |
# Modularise your project and enable parallel build | |
org.gradle.parallel=true | |
# Enable configure on demand. |
This file contains hidden or 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
package com.dixeam.millionarequotes.dialogBoxes; | |
import android.annotation.SuppressLint; | |
import android.app.AlertDialog; | |
import android.app.Dialog; | |
import android.app.DialogFragment; | |
import android.app.ProgressDialog; | |
import android.content.Context; |
This file contains hidden or 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
package com.dixeam.millionarequotes.dialogBoxes; | |
import android.annotation.SuppressLint; | |
import android.app.AlertDialog; | |
import android.app.Dialog; | |
import android.app.DialogFragment; | |
import android.app.ProgressDialog; | |
import android.content.Context; |
This file contains hidden or 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 a custom SpanSizeLookup where the first item spans both columns | |
/*layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { | |
@Override | |
public int getSpanSize(int position) { | |
if (position == 0) { | |
return 1; | |
} | |
if (StoriesFragment.dataList.get(position) instanceof NativeAdView) | |
return 2; | |
else if (StoriesFragment.dataList.get(position) instanceof ModelForDailyandRecent) |
This file contains hidden or 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
package com.dixeam.millionarequotes.Fragments; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; | |
import android.support.design.widget.TabLayout; |
This file contains hidden or 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 take(){ | |
Intent callCameraApplicationIntent = new Intent(); | |
callCameraApplicationIntent.setAction(MediaStore.ACTION_IMAGE_CAPTURE); | |
File photoFile = null; | |
try { | |
photoFile = createImageFile(); | |
} catch (IOException e) { | |
e.printStackTrace(); |
This file contains hidden or 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 long getDirSize(File dir){ | |
long size = 0; | |
for (File file : dir.listFiles()) { | |
if (file != null && file.isDirectory()) { | |
size += getDirSize(file); | |
} else if (file != null && file.isFile()) { | |
size += file.length(); | |
} | |
} |