- Get link
- X
- Other Apps
Posts
Play video on Sketchware
- Get link
- X
- Other Apps
Code is here: Video Code in Sketchware file:///android_res/raw/index.html Code in resources folder {"resFullName":"mov.mp4","resName":"mov","resType":1} {"resFullName":"index.html","resName":"index","resType":1} Html file <!DOCTYPE html> <body> <video width="400"controls> <source src="mov.mp4"type="video/mp4"> Your browser does not support HTML5 video. </video> </body> </html>
How to add calendar in your Android App using Sketchware
- Get link
- X
- Other Apps
Code is here: DatePicker dp\u003dnew DatePicker (MainActivity.this);linear1.addView(dp);Calendar calendar\u003dCalendar.getInstance(); dp.init(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH),new DatePicker.OnDateChangedListener(){@Override public void onDateChanged(DatePicker datePicker, int i, int i1, int i2) {Toast.makeText(getApplicationContext(),datePicker.getDayOfMonth() + \"-\" +datePicker.getMonth() + \"-\"+datePicker.getYear(),Toast.LENGTH_SHORT).show(); } });
Enable download in Sketchware web browser
- Get link
- X
- Other Apps
Webview download hijack Code here: webview1.setDownloadListener(new DownloadListener() {\n public void onDownloadStart(String url, String userAgent,\n String contentDisposition, String mimetype,\n long contentLength) {\n Intent i \u003d new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n }\n});
Swipe Detection in Android app
- Get link
- X
- Other Apps
Don't forget to subscribe my channel. Copy code here: linear1.setOnTouchListener(new View.OnTouchListener()\n{@Override\n public boolean onTouch(View myview, MotionEvent myme){ \nswitch(myme.getAction()) { \ncase MotionEvent.ACTION_DOWN: {x1 \u003d myme.getX();\ny1 \u003d myme.getY();};\nbreak; \ncase MotionEvent.ACTION_UP: {x2 \u003d myme.getX();\ny2 \u003d myme.getY();\n_swipedetection ();};\nbreak;\n}\nreturn true;}});