Unchecked call to add(E) as a member of raw type java.util.List
// warnning
private List list = new ArrayList();
// ok /put type of added object
private List<String> list = new ArrayList<String>();
396LW NO topic_id
AD
Další témata ....(Topics)
Window>Preference>Java>Editor>Typing and check the "Escape text when pasting into a string literal".
"id cannot be resolved or is not a field” error
If you copy project to workspace or some code from other project you can get this error.
Try remove or add import your R file:
Check xml files.
Clean project by menu Project-Clean
Maybe you have to create new project end copy old source files to new project folders.
If you copy project to workspace or some code from other project you can get this error.
Try remove or add import your R file:
import com.example.app.R
Check xml files.
Clean project by menu Project-Clean
Maybe you have to create new project end copy old source files to new project folders.
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static Bitmap codec(Bitmap src, Bitmap.CompressFormat format,
int quality) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
src.compress(format, quality, os);
byte[] array = os.toByteArray();
return BitmapFactory.decodeByteArray(array, 0, array.length);
}
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 bmp = BitmapFactory.decodeResource(getResources(), R.drawable.flower_blue);
Bitmap bPNGcompress = codec(bmp, Bitmap.CompressFormat.PNG, 0);
int h = bmp.getHeight();
canvas.drawBitmap(bmp, 10,10, paint);
canvas.drawBitmap(bPNGcompress, 10,10 + h + 10, paint);
}
}
}
Displej 1280 x 800, 5.3 "
Rozměry 146.85 mm x 83 mm x 9.7 mm
Rozlišení fotoaparátu 8 Mpix
HD video, natačení videosekvencí
Operační system Android
Hlasové ovládání
Přehrávání MP3
Baterie Li-Ion ,doba hovoru 1570 min
Frekvence procesoru 1.4 GHz
Uživatelská paměť 16000 MB
Datové funkce: GPS modul, WiFi, Bluetooth, GPRS, EDGE, HSCSD, Hardwarový modem, Infraport
Podporované sítě GSM&EDGE 850 / 900 / 1.800 / 1.900
Formát videosouborů 3GPP / H.263 / H.264 / MPEG4 / WMV
Rozměry 146.85 mm x 83 mm x 9.7 mm
Rozlišení fotoaparátu 8 Mpix
HD video, natačení videosekvencí
Operační system Android
Hlasové ovládání
Přehrávání MP3
Baterie Li-Ion ,doba hovoru 1570 min
Frekvence procesoru 1.4 GHz
Uživatelská paměť 16000 MB
Datové funkce: GPS modul, WiFi, Bluetooth, GPRS, EDGE, HSCSD, Hardwarový modem, Infraport
Podporované sítě GSM&EDGE 850 / 900 / 1.800 / 1.900
Formát videosouborů 3GPP / H.263 / H.264 / MPEG4 / WMV
Cut, shear, clip, snip, crop a bitmap, picture, image Android example
public class ApokusActivity 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);
// you need to insert a image flower_blue into res/drawable folder
paint.setFilterBitmap(true);
Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),
R.drawable.flower_blue);
Bitmap croppedBmp = Bitmap.createBitmap(bitmapOrg, 0, 0,
bitmapOrg.getWidth() / 2, bitmapOrg.getHeight());
int h = bitmapOrg.getHeight();
canvas.drawBitmap(bitmapOrg, 10, 10, paint);
canvas.drawBitmap(croppedBmp, 10, 10 + h + 10, paint);
}
}
}
Editace: 2017-10-21 13:32:35
Počet článků v kategorii: 396
Url:unchecked-call-to-adde-as-a-member-of-raw-type-java-util-list