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
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
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.aracem.utils.animations.pagetransformation; | |
import org.jetbrains.annotations.NotNull; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import java.util.ArrayList; | |
import java.util.List; |
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 transformPage(View view, float position) { | |
int pageWidth = view.getWidth(); | |
if (position < -1) { // [-Infinity,-1) | |
// This page is way off-screen to the left. | |
view.setAlpha(0); | |
} else if (position <= 1) { // [-1,1] | |
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
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { | |
dialog = new Dialog(getActivity()); | |
dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); | |
return dialog; | |
} |
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 static Animation expand(final View v, final boolean expand) { | |
try { | |
Method m = v.getClass().getDeclaredMethod("onMeasure", int.class, int.class); | |
m.setAccessible(true); | |
m.invoke( | |
v, | |
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), | |
MeasureSpec.makeMeasureSpec(((View)v.getParent()).getMeasuredWidth(), MeasureSpec.AT_MOST) | |
); | |
} catch (Exception e) { |
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
Intent intentEmail = new Intent(Intent.ACTION_SEND); | |
intentEmail.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"}); | |
intentEmail.putExtra(Intent.EXTRA_SUBJECT, "your subject"); | |
intentEmail.putExtra(Intent.EXTRA_TEXT, "message body"); | |
intentEmail.setType("message/rfc822"); | |
startActivity(Intent.createChooser(intentEmail, "Choose an email provider :")); |
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
Afrikaans af | |
Amharic am | |
Arabic ar | |
Belarusian be | |
Bulgarian bg | |
Catalan ca | |
Chinese(Simplified) zh-CN | |
Chinese(Traditional) zh-TW | |
Croatian hr | |
Czech cs-CZ |
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
<!-- All language list --> | |
<string-array name="languages"> | |
<item>Afrikaans</item> af | |
<item>Amharic</item> am | |
<item>Arabic</item> ar | |
<item>Belarusian</item> be | |
<item>Bulgarian</item> bg | |
<item>Catalan</item> ca | |
<item>Chinese(Simplified)</item> zh-CN | |
<item>Chinese(Traditional)</item> zh-TW |
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
<!-- All language list --> | |
<string-array name="languages"> | |
<item>Afrikaans</item> | |
<item>Amharic</item> | |
<item>Arabic</item> | |
<item>Belarusian</item> | |
<item>Bulgarian</item> | |
<item>Catalan</item> | |
<item>Chinese(Simplified)</item> | |
<item>Chinese(Traditional)</item> |
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
/** | |
* Get the area of the screen size. following calculation done with the help | |
* of Ashik :D | |
* | |
* @param context | |
* @param percentage | |
* @return intRequiredCellSize | |
* @author Ashik Ali | |
*/ | |
public static int getCellSizeForScreen(Context context, double percentage) { |