Statistics usability of mobile phones with Android - September 2011
(Our software)
1 | Samsung Galaxy S2 | 13.8% (1,232) |
2 | Samsung Galaxy S | 8.5% (762) |
3 | Samsung Galaxy Tab | 7.4% (659) |
4 | Samsung Galaxy Mini | 5.4% (483) |
5 | Samsung Galaxy S | 4.0% (356) |
6 | HTC Desire HD | 3.8% (341) |
7 | Samsung Galaxy Ace | 3.8% (339) |
8 | HTC Wildfire | 3.2% (286) |
9 | Samsung Galaxy Fit | 3.1% (274) |
10 | SEMC Xperia X10 | 2.1% (190) |
396LW NO topic_id
AD
Další témata ....(Topics)
Map<Float,String> linkedHashMap = new LinkedHashMap<Float, String>();
linkedHashMap.put(14.f, "text");
linkedHashMap.put(13.f, "text");
linkedHashMap.put(10.f, "text");
linkedHashMap.put(11.f, "text");
linkedHashMap.put(2.f, "text");
linkedHashMap.put(3.f, "text");
linkedHashMap.put(1.f, "text");
linkedHashMap.put(7.f, "text");
linkedHashMap.put(23.f, "text");
for (Entry<Float,String> entry : linkedHashMap.entrySet()) {
System.out.println(entry.getKey());
}
14.0
13.0
10.0
11.0
2.0
3.0
1.0
7.0
23.0
Map<Float,String> hashMap = new HashMap<Float, String>();
hashMap.put(14.f, "text");
hashMap.put(13.f, "text");
hashMap.put(10.f, "text");
hashMap.put(11.f, "text");
hashMap.put(2.f, "text");
hashMap.put(3.f, "text");
hashMap.put(1.f, "text");
hashMap.put(7.f, "text");
hashMap.put(23.f, "text");
for (Entry<Float,String> entry : hashMap.entrySet()) {
System.out.println(entry.getKey());
}
// key :
1.0
14.0
3.0
13.0
2.0
7.0
11.0
23.0
10.0
import android.os.Build.VERSION;
//
int nSdkVersion = Integer.parseInt(Build.VERSION.SDK);
int nApiVersion = VERSION.SDK;
Platform Version | API Level |
---|---|
Android 4.0 | 14 |
Android 3.2 | 13 |
Android 3.1.x | 12 |
Android 3.0.x | 11 |
Android 2.3.4 | 10 |
Android 2.3.3 | 10 |
Android 2.3.2 | 9 |
Android 2.3.1 | 9 |
Android 2.3 | 9 |
Android 2.2.x | 8 |
Android 2.1.x | 7 |
Android 2.0.1 | 6 |
Android 2.0 | 5 |
Android 1.6 | 4 |
Android 1.5 | 3 |
Android 1.1 | 2 |
Android 1.0 | 1 |
Code with error:
If you get error try this code:
java.lang.ClassCastException: android.view.ViewGroup$LayoutParams
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:659)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:311)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at android.view.View.measure(View.java:8313)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at android.view.View.measure(View.java:8313)
ImageView imgV = (ImageView)findViewById(R.id.myView);
imgV.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
0));
If you get error try this code:
ViewGroup.LayoutParams layoutParams = imgV
.getLayoutParams();
layoutParams.height = 0;
imgV.setLayoutParams(layoutParams);
java.lang.ClassCastException: android.view.ViewGroup$LayoutParams
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:659)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:311)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at android.view.View.measure(View.java:8313)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at android.view.View.measure(View.java:8313)
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static class SampleView extends View {
// CONSTRUCTOR
public SampleView(Context context) {
super(context);
setFocusable(true);
}
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
canvas.drawColor(Color.YELLOW);
Bitmap b = Bitmap.createBitmap(200, 200,
Bitmap.Config.ARGB_8888);
// you need to insert a image flower_blue into res/drawable folder
paint.setFilterBitmap(true);
Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),
R.drawable.flower_blue);
canvas.drawBitmap(bitmapOrg, 10, 10, paint);
int width, height;
Canvas c = new Canvas(b);
paint.setAlpha(255); //0x80
c.translate(0, 30);
c.drawBitmap(bitmapOrg, new Matrix(), paint);
paint.setColor(Color.BLUE);
Path mPath = new Path();
mPath.addCircle(50, 50, 50, Path.Direction.CCW);
//c.clipPath(mPath, Region.Op.UNION);
//c.clipPath(mPath, Region.Op.DIFFERENCE);
c.clipPath(mPath, Region.Op.INTERSECT);
//c.clipPath(mPath, Region.Op.REPLACE);
//c.clipPath(mPath, Region.Op.XOR);
paint.setColor(Color.GREEN);
paint.setAntiAlias(true);
c.drawCircle(30, 20, 30, paint);
int h = bitmapOrg.getHeight();
//canvas.drawBitmap(bitmapOrg, 10, 10, paint);
canvas.drawBitmap(b, 0, 10 + h + 10, paint);
}
}
}
If I create own folder layout-w320dp with Eclipse Android 4.4
layout was correctly loaded.
If I trying this application on tablet with Android 2.1 application crashed.
layout was correctly loaded.
If I trying this application on tablet with Android 2.1 application crashed.
Editace: 2011-10-19 08:16:12
Počet článků v kategorii: 396
Url:statistics-usability-of-mobile-phones-with-android-september-2011