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 TabsPagerAdapter extends FragmentPagerAdapter { | |
public List<Fragment> mFragments; | |
public TabsPagerAdapter(FragmentManager fm, List<Fragment> fragments) { | |
super(fm); | |
this.mFragments = fragments; | |
} | |
@Override |
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 abstract class AbstractActivity extends AppCompatActivity { | |
@Override protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(getLayoutId()); //This guy accept a Integer and View... | |
ButterKnife.bind(this); | |
} | |
protected abstract int getLayoutId(); | |
protected abstract View getLayoutId(); |
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
package com.camerite.ui.dialog; | |
import android.app.AlertDialog; | |
import android.app.Dialog; | |
import android.content.DialogInterface; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.TextView; |
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
package com.myhappyapp.utils; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import com.facebook.CallbackManager; | |
import com.facebook.FacebookCallback; | |
import com.facebook.FacebookException; | |
import com.facebook.GraphRequest; | |
import com.facebook.GraphResponse; | |
import com.facebook.login.LoginManager; |
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
package com.happyapp.utils; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import com.facebook.CallbackManager; | |
import com.facebook.FacebookCallback; | |
import com.facebook.FacebookException; | |
import com.facebook.GraphRequest; | |
import com.facebook.GraphResponse; | |
import com.facebook.login.LoginManager; |
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
package com.happyapp.utils; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import com.facebook.CallbackManager; | |
import com.facebook.FacebookCallback; | |
import com.facebook.FacebookException; | |
import com.facebook.GraphRequest; | |
import com.facebook.GraphResponse; | |
import com.facebook.login.LoginManager; |
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
language: android | |
before_install: | |
- chmod 755 gradlew | |
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null | |
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null | |
android: | |
components: | |
- build-tools-23.0.1 |
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
/* | |
* Copyright (C) 2014 Pedro Vicente Gómez Sánchez. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/blue"> <!-- Change your color here --> | |
<com.github.ppamorim.cult.CultView | |
android:id="@+id/cult_view" | |
android:layout_width="match_parent" |
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 UIKit | |
extension UIImage { | |
func imageWithInsets(insetDimen: CGFloat) -> UIImage { | |
return imageWithInset(UIEdgeInsets(top: insetDimen, left: insetDimen, bottom: insetDimen, right: insetDimen)) | |
} | |
func imageWithInset(insets: UIEdgeInsets) -> UIImage { | |
UIGraphicsBeginImageContextWithOptions( | |
CGSizeMake(self.size.width + insets.left + insets.right, |
OlderNewer