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 void makeMeRequest() { | |
Request request = Request.newMeRequest(ParseFacebookUtils.getSession(), | |
new Request.GraphUserCallback() { | |
@Override | |
public void onCompleted(GraphUser user, Response response) { | |
if (user != null) { | |
String nombre = (String) user.getProperty("first_name"); | |
String apellido = user.getLastName(); | |
String sexo = (String) user.getProperty("gender"); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- general colors --> | |
<color name="white">#ffffff</color> | |
<color name="black">#000000</color> | |
<color name="white_light">#80ffffff</color> | |
<color name="black_light">#80000000</color> | |
<!-- colors Flatui --> | |
<color name="flatui_turquoise">#1abc9c</color> |
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
try { | |
PackageInfo info = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), PackageManager.GET_SIGNATURES); | |
for (android.content.pm.Signature signature : info.signatures) { | |
MessageDigest md; | |
md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
String something = new String(Base64.encode(md.digest(), 0)); | |
//this is key has of facebook | |
Log.e("fb_hash", something); | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="@android:integer/config_longAnimTime" | |
android:fromXDelta="100%p" | |
android:toXDelta="0%p" /> | |
<alpha |
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
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="@android:integer/config_longAnimTime" | |
android:fromXDelta="0" | |
android:toXDelta="-100%p" /> | |
<alpha |
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
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 | |
60% — 99 | |
55% — 8C |
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
public class RoundedTransformation implements com.squareup.picasso.Transformation { | |
private final int radius; | |
private final int margin; // dp | |
// radius is corner radii in dp | |
// margin is the board in dp | |
public RoundedTransformation(final int radius, final int margin) { | |
this.radius = radius; | |
this.margin = margin; | |
} |
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
/**generate key hash facebook**/ | |
EditText txt_key_fb = (EditText) findViewById(R.id.txt_fb); | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo( | |
getPackageName(), PackageManager.GET_SIGNATURES); | |
for (android.content.pm.Signature signature : info.signatures) { | |
MessageDigest md; | |
md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); |
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
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="android:actionBarStyle">@style/MyActionBar</item> | |
<item name="actionBarStyle">@style/MyActionBar</item> | |
</style> | |
<!-- My Action Bar Style --> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="AppTheme" parent="android:Theme.Material.Light"> | |
<item name="android:colorPrimary">@color/red_forte</item> | |
<item name="android:colorPrimaryDark">@color/red_light</item> | |
<item name="android:textColorPrimary">@color/white</item> | |
</style> | |
</resources> |
OlderNewer