Posts

Showing posts from November, 2021

how to create a full screen dialog with CropImageView | sketchware pro

Image
  To create a fullscreen dialog with CropImageView in Sketchware, follow the steps given below. 1. Add an ImageView  imageview1  for displaying image. 2. Add a FilePicker component  fp: image/*  for picking images. 3. In  imageview1 onClick  event use block  FilePicker fp pick files . 4.  Download CropUtils.zip  from this url: http://apktutor.com/wp-content/uploads/2021/11/CropUtils.zip 5.  Extract CropUtils.java  at .sketchware/mysc/(Project number)/app/src/main/java/(package name)/CropUtils.java 6. Open CropUtils.java and  change package name  ( package com.my.dmchat; ) to your project's package name. 7. Create a more block  extra . Here declare a CropImageView  crp , a Bitmap  image  and define  rotateBitmap(Bitmap) . } CropUtils.CropImageView crp; Bitmap image; public Bitmap rotateBitmap(Bitmap bitmap){ android.graphics.Matrix matrix = new android.graphics.Matrix(); matrix.postScale((f...

Display loading page over WebView while loading

Image
Display loading page over WebView while loading To display a page with a text and image over the WebView while it is loading, follow the steps given below. 1. Create a new project in Sketchware. 2. In  main.xml , add a LinearV  linear1 . * Inside  linear1  add a WebView  webview1 . Set height of  webview1  to  wrap_content . * Below  webview1  add another LinearV  linear2 . * For  linear1  set padding to 0. * Inside  linear2  add ImageView  imageview1 , and a TextView  textview1 . * For  linear2  set gravity to  center_horizontal ,  center_vertical , and alpha to 0.5. * For  webview1  change height to  match_parent . 3. Switch On  AppCompat and Design . 4. In  MainActivity.java , create a more block  extra . In this more block declare a RelativeLayout  rl  and a SwipeRefreshLayout  srl,  using following codes. } RelativeLayout r...