Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

How disable Choreographer in LogCat Eclipse Android


choreographer skipped frames
Create filter with TAG regex to disable Choreographer messages, see code and picture below:

^((?!Choreographer).)*$


choreographer-disable-remove

397LW NO topic_id



Další témata ....(Topics)


94

Is NaN isNaN isInfinite number value Java Android example | is-nan-isnan-java-example


float, double is NaN isNaN() isInfinite() Java Android example.

float f = 0.f;
boolean bIsNaN = Float.isNaN(f);
boolean bIsInfinite = Float.isInfinite(f);

 double d = Math.sqrt(-10);
 boolean b = Double.isNaN(d);

66

Locale location Java Android example | locale-location-java-android-example



Locale lc = Locale.getDefault(); // default now locale on device
	String sCountry = lc.getCountry(); // CZ
	
	lc = new Locale("fr","FR"); //FRANCE .. Locale(language, country);
	String sCountry2 = lc.getDisplayCountry(); // Francie

	 Locale locale = Locale.GERMAN;					    
	 String sCountry3 = locale.getDisplayCountry(); // ""

 Locale locale = Locale.GERMAN;
 DateFormat formatter = new SimpleDateFormat("HH:mm:ss zzzz", locale);
 String s = formatter.format(new Date());//13:40:39 GMT+00:00					


// array of locales   
 Locale[] locales = { new Locale("fr", "FR"), new Locale("de", "DE"),
				        new Locale("en", "US") };


Locale locale = Locale.US;

// for date
DateFormat dateFormatterEurope = DateFormat.getDateInstance(DateFormat.DEFAULT,
					Locale.GERMANY);
Calendar myCalendar = Calendar.getInstance();
String sDate = dateFormatterEurope.format(myCalendar.getTime());

        final byte[] langBytes = locale.getLanguage().getBytes(Charsets.US_ASCII);
        
// UTF-8 most widely used text format for to properly display of text
        final Charset utfEncoding = Charsets.UTF_8;
        String text = "ěščřžýáíéůú"; 
        final byte[] textBytes = text.getBytes(utfEncoding);


// other Locale
CANADA
CANADA_FRENCH
CHINA
CHINESE
ENGLISH
FRANCE
FRENCH
GERMAN
GERMANY
ITALIAN
ITALY
JAPAN
JAPANESE
KOREA
KOREAN
PRC // Locale constant for zh_CN. 
ROOT // Locale constant for the root locale. 
SIMPLIFIED_CHINESE
TAIWAN
TRADITIONAL_CHINESE Locale constant for zh_TW. 
UK
US
93

Android Emulator PC keyboard shortcuts | android-emulator-pc-keyboard-shortcuts


Basic shortcuts for Android Emulator.
























Emulated Device Key Keyboard Key
Home HOME
Menu (left softkey) F2 or Page-up button
Star (right softkey) Shift-F2 or Page Down
Back ESC
Call/dial button F3
Hangup/end call button F4
Search F5
Power button F7
Audio volume up button KEYPAD_PLUS, Ctrl-5
Audio volume down button KEYPAD_MINUS, Ctrl-F6
Camera button Ctrl-KEYPAD_5, Ctrl-F3
Switch to previous layout orientation (for example, portrait, landscape) KEYPAD_7, Ctrl-F11
Switch to next layout orientation (for example, portrait, landscape) KEYPAD_9, Ctrl-F12
Toggle cell networking on/off F8
Toggle code profiling F9 (only with -trace startup option)
Toggle fullscreen mode Alt-Enter
Toggle trackball mode F6
Enter trackball mode temporarily (while key is pressed) Delete
DPad left/up/right/down KEYPAD_4/8/6/2
DPad center click KEYPAD_5
Onion alpha increase/decrease KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)


More about Android Emulator
347

Pixel to density independent pixel to pixel conversion | pixel-to-density-independent-pixel-to-pixel-conversion


Physical pixel (px)
Density independent pixel (dp)
Dots per inch (dpi) .. physical pixels per inch
px = dp * (dpi / 160)

public static int dpToPx(int dp)
{
    return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
}

public static int pxToDp(int px)
{
    return (int) (px / Resources.getSystem().getDisplayMetrics().density);
}
342

Android Studio hide delete import module | android-studio-hide-delete-import-module


Hide module - open dialog: File > Project Structure Ctrl + Alt + Shift + S
android-studio-hide-module.jpg

Hide module: in opened Dialog select module which will hidden and click on minus (left upper corner)

android-studio-hide-module-from-project-explorer.jpg

If module is hidden, you can permanetly delete module from disk. But if you want using module in future,  copy module into other folder (not into AndroidProjects folder and his subbfolders) and delete module permanetly from project and disc. Right mouse click on module and select from menu Delete.
android-studio-delete-module-from-disc.jpg

If you want import the backup copy to project, use: File>New>Import mudule
android-studio-import-module.jpg


Editace: 2014-02-15 20:15:08
Počet článků v kategorii: 397
Url:how-to-disable-choreographer-messages
Share
Share
Tweet