HTC Incredible 2
396LW NO topic_id
AD
Další témata ....(Topics)
First cteate big icon 512x512 px formtat .PGN in graphics editor as Photoshop, Gimp, Piant.NET and save image.
If you create new project via Eclipse and choice your 512x512 image for ic_launcher.
Eclipse will make all icons from this image for new application very well.
If you create new project via Eclipse and choice your 512x512 image for ic_launcher.
Eclipse will make all icons from this image for new application very well.
Android development
Java float is 32 bit single precision type and used when fractional precision calculation is required.
Java float je 32 bitů veliké číslo sloužící především pro přesný výsledek za desetinnou tečkou například při dělení čísel. Pro větší přesnost použíijte 64 bitový typ Double.
Java float is 32 bit single precision type and used when fractional precision calculation is required.
Java float je 32 bitů veliké číslo sloužící především pro přesný výsledek za desetinnou tečkou například při dělení čísel. Pro větší přesnost použíijte 64 bitový typ Double.
// declaration and assignment of value type float
float x = 18.41785f;
//print formated value
System.out.printf("The value of x is %.3f%n", x); // 18.418
// declaring more variables in single statement
float f1 = 12.4F, f2 = 564.5F, f3 = 14.589F;
// float range of value
System.out.println(Float.MIN_VALUE); // 4E-45
System.out.println(Float.MAX_VALUE); // 4028235E38
// is NaN Not-a-Number
float f = (float) Math.sqrt(-15);
boolean bNaN = Float.isNaN(f);
System.out.print(bNaN); // true
// check if a string is a valid number in Java example
// convert string to float Java example
String sF = "12.8";
float fParse = Float.parseFloat(sF);
// convert strings to numbers
String sFl = "15.48";
float fFromString = (Float.valueOf(sFl)).floatValue();
// float to string in Java example code
Float fObj = new Float(68.5);
String str = fObj.toString();
// else
Float fS = 11.6f;
String sFloat = fS.toString();
// compare two float variables
Float fComp1 = 4.3f;
if(fComp1.equals(4.3f))
System.out.print("true");
// compares the two specified float values in Java example
int i = Float.compare(11.5f, 11.7f); // -1 first < second
// 0 first == second
// 1 first > second
System.out.print(i);
Try insert + before R.drawable.xxxx
// error
InputStream is = context.getResources().openRawResource(R.drawable.app_sample_code);
// ok
InputStream is = context.getResources().openRawResource(+R.drawable.app_sample_code);
Check your xml files in Eclipse Graphical Editor and fix problems.
Check project setup, right click on project, select properties, Java build path and
select correct Android version etc.
Right click on project, Android Tools, Fix Project Properties
Menu Eclipse select Project ->Clean.
Check project setup, right click on project, select properties, Java build path and
select correct Android version etc.
Right click on project, Android Tools, Fix Project Properties
Menu Eclipse select Project ->Clean.
If You have old PC (Android in emulator with high screen resolution uses a lot of memory) or your testing phone have small screen, You can try this trick.
Rename layout folder for small device screen f.g. from layout into layout-swXXXdp and a large layout-sw600dp into layout.
Your phone with small screnn will do select xml file from renamed layout folder (for small screen).
You can to testing rotation with device en stability of fragments if an application changed orientation.
If you have old pc, you can try to make a new virtual device running on older version of Android, which uses less memory of computer.
For testing of rotation stability - application orientation changed - use on emulator Ctrl+F11, Ctrl+F12 key (Windows).
Important
Before the release of application, you have to rename layout folder to older name layout-sw600dp and layout-swXXXdp to layout.
Rename layout folder for small device screen f.g. from layout into layout-swXXXdp and a large layout-sw600dp into layout.
Your phone with small screnn will do select xml file from renamed layout folder (for small screen).
You can to testing rotation with device en stability of fragments if an application changed orientation.
If you have old pc, you can try to make a new virtual device running on older version of Android, which uses less memory of computer.
For testing of rotation stability - application orientation changed - use on emulator Ctrl+F11, Ctrl+F12 key (Windows).
Important
Before the release of application, you have to rename layout folder to older name layout-sw600dp and layout-swXXXdp to layout.
Editace: 2012-02-22 12:54:56
Počet článků v kategorii: 396
Url:htc-incredible-2