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
static Map<String, Class<?>> fragmentsClassMap; | |
static { | |
fragmentsClassMap = new HashMap<String, Class<?>>(); | |
Class<?>[] fragmentClassArray = new Class<?>[] { | |
Fragment1.class, | |
Fragment2.class | |
}; | |
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 /* YOUR PACKAGE HERE */; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.KeyEvent; | |
import android.view.View; | |
import android.view.View.OnKeyListener; | |
import android.view.inputmethod.InputMethodManager; | |
import android.widget.EditText; |
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 /* YOUR PACKAGE HERE */; | |
package cc.edinteractive.visitavirtual.fragment; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.Fragment; | |
import android.view.LayoutInflater; | |
import android.view.View; |
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 /* YOUR PACKAGE HERE */; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.text.Html; | |
import android.text.TextUtils; |
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
var program = require('commander'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var conf = {}; | |
process.chdir("C:\\Users\\Julio\\Desktop\\visitavirtual-android\\automation-tools"); | |
require('rc')('gen', conf); | |
program | |
.version('0.0.1') | |
.option('-c, --clazz <filename>', 'Java class of the new fragment') |
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
var _ = require('lodash'); | |
var removeDiacritics = require('diacritics').remove; | |
var replaceUnicodeSymbols = function(slug, lang) { | |
if (lang == undefined) lang = 'pt'; | |
var enCharMap = { | |
'☢':"radioactive",'☠':"skull-and-bones",'☤':"caduceus", | |
'☣':"biohazard",'☭':"hammer-and-sickle", '☯':"yin-yang",'☮':"peace", |
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
- (void)createThumbImageWithImage:(UIImage*)image | |
{ | |
float radius = 19.0; | |
CGSize originalImageSize = image.size; | |
CGRect newRect = CGRectMake(0, 0, radius*2, radius*2); | |
float ratio = MAX(newRect.size.width / originalImageSize.width, newRect.size.height / originalImageSize.height); | |
UIGraphicsBeginImageContextWithOptions(newRect.size, NO, 0.0); | |
// circular mask |
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
[push] | |
default = simple | |
[alias] | |
co = checkout | |
st = status | |
br = branch |
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 DialogUtils { | |
public static ProgressDialog makeProgressWithoutTitleNorMessageDialog(Context context) { | |
ProgressDialog dialog = new ProgressDialog(context); | |
try { | |
dialog.show(); | |
} catch (WindowManager.BadTokenException e) { | |
} | |
dialog.setCancelable(false); | |
dialog.setContentView(R.layout.dialog_progress_no_message_nor_title); |
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; | |
public class ScalingUtils { | |
public static int dpToPx(final Context context, final float dp) { | |
// Took from http://stackoverflow.com/questions/8309354/formula-px-to-dp-dp-to-px-android | |
final float scale = context.getResources().getDisplayMetrics().density; | |
return (int) ((dp * scale) + 0.5f); | |
} | |
} |
OlderNewer