Create Image From View Screen Android
WebView_webview = (WebView)findViewById(R.id.webViewMapa);
_webview.getSettings().setBuiltInZoomControls(true);
_webview.setBackgroundColor(Color.parseColor("#E8EAE8"));
// _webview.loadUrl( ... some your page
Bitmap b = Bitmap.createBitmap(_webview.getWidth()/2, _webview.getHeight(), Bitmap.Config.ARGB_8888);
// you can to draw on bitmap
Canvas c = new Canvas(b);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setStrokeWidth(15.f);
paint.setColor(Color.RED);
paint.setStyle(Paint.Style.STROKE);
//paint.setShadowLayer(5.f, 0, 5.f, 0xFF000000);
_webview.draw(c); // put into canvas content of view like image
c.drawLine(70, 0, 150, 350, paint);// draw some line
//Rect oval = new Rect(0, 0, 100, 100);
//c.drawArc(oval, 0, 180, false, paint);
// you can show bitmap in other view
((ImageView)findViewById(R.id.imageView1)).setImageBitmap(b);
396LW NO topic_id
AD
Další témata ....(Topics)
// warnning
private List list = new ArrayList();
// ok /put type of added object
private List<String> list = new ArrayList<String>();
Not request focus EditText if startup Android - hide keyboard if startup.
Remove: from EditText
Create a LinearLayout and set the:
attributes android:focusable="true" android:focusableInTouchMode="true"
Remove:
Create a LinearLayout and set the:
attributes android:focusable="true" android:focusableInTouchMode="true"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical" >
</LinearLayout>
To hide a module File->Project Structure Ctrl+Alt+Shift+S
In left panel click on Module which want to hide.
Click on minus symbol (-) on upper left corner of window.
Click Yes.
To delete module from disk click on module in project tree (to select) and press Delete on keyboard.
In left panel click on Module which want to hide.
Click on minus symbol (-) on upper left corner of window.
Click Yes.
To delete module from disk click on module in project tree (to select) and press Delete on keyboard.
Check this in XML file if use singleLine
singleLine change to maxLines (1 if singleLine)
declare inputType
singleLine change to maxLines (1 if singleLine)
declare inputType
android:maxLines="1"
android:inputType="text"
static boolean mbThemeLight = false;
@Override
public void onCreate(Bundle savedInstanceState) {
if(mbThemeLight)
setTheme(android.R.style.Theme_Light);
super.onCreate(savedInstanceState);
// bla bla bla..........
}
private void switchTheme(){
mbThemeLight = true;
this.recreate();
}
Editace: 2013-07-08 07:38:23
Počet článků v kategorii: 396
Url:create-image-from-view-screen-android