Postingan

Menampilkan postingan dari Juni, 2020

Codes for modifying Action Bar in Sketchware

Gambar
We can modify the Action Bar or Title bar in our Sketchware project, by using simple codes in onCreate method. Below I provide a few of those codes. Change title of Action Bar ActionBar ab = getActionBar(); ab.setTitle(" Title "); Replace the underlined text with the title you want to set. Change subtitle of Action Bar ActionBar ab = getActionBar(); ab.setSubtitle(" s​ubtitle "); Replace the underlined text with the subtitle you want to set. Show App icon in Action Bar ActionBar ab = getActionBar(); ab.setDisplayShowHomeEnabled(true); Set an image as icon in Action Bar Add the image to be displayed in Action Bar using Image Manager in your sketchware android project. Then add the following code in onCreate event. ActionBar ab = getActionBar(); ab.setIcon(getDrawable(R.drawable. imagename )); ab.setDisplayShowHomeEnabled(true); Replace the underlined text with name of the image added using Image Manager. Use Custom view in Action Bar ActionBar ab = getActionBar(); ab...

BulletSpan and DrawableMarginSpan example in Sketchware

Gambar
BulletSpan example A BulletSpan styles paragraphs as bullet points. BulletSpans are attached from the first character to the last character of a single paragraph. BulletSpans allow configuring the following elements: gap width - the distance, in pixels, between the bullet point and the paragraph. Default value is 2px. color - the bullet point color. By default, the bullet point color is 0 - no color, so it uses the TextView's text color. bullet radius - the radius, in pixels, of the bullet point. Default value is 4px. Constructor: BulletSpan(int gapWidth, int color, int bulletRadius) Creates a BulletSpan based on a gap width and a color integer. This example shows how to add Bullets to paragraphs in a TextView using BulletSpan in Sketchware. 1. In  main.xml  add a TextView  textview1 . 2. In  MainActivity.java , create a new String  mystring . 3. In  onCreate  of  MainActivity.java : a. Set the text of  mystring  to your text. So let's s...

Add ListView to Navigation drawer

Gambar
In the latest version of Sketchware (v2.2.2), appcompat-v7 and design have been added, and we can now add a navigation drawer to our project. This navigation drawer uses a CustomView. But the CustomView in Sketchware doesn't have option to add a ListView. In order to add a ListView to the drawer, we have to create the ListView programmatically and then add it to the drawer. To know how it can be done follow the steps given below. 1. In your Sketchware android project, go to  Library manager  and switch on AppCompat and Design. 2. In  View manager , go to MainActivity.java and select  Navigation Drawer Activity . 3. Now go to the CustomView  drawer_main  and add a LinearV  linear1 . Set it's width as MATCH_PARENT. 4. Create a new String list  mylist . 5. Create a new Intent component  i . 6. Now suppose you have five other activities  SettingsActivity.java ,  NotesActivity.java ,  FeedbackActivity.java ,  PrivacyActivity.ja...

How to integrate Admob Ads in Sketchware project using AIDE?

Gambar
AIDE can be used to integrate Admob Ads to a Sketchware project. First export the source code of your sketchware android project and then  follow the steps below to learn how to integrate Admob  banner ads  in AIDE. Prerequisites A Sketchware project AIDE with pro account key purchased Account in Google developer console Account in Admob Before placing admob ads in an app, the app needs to be uploaded to google play store, however test ads can be tried in any app. Always place the test ad ID before placing your ad unit ID.  App ID  and  ad unit ID  can be obtained by registering the app on Admob. But for using test ads no registration is required. Do not click on your own Ads. This code works in apps which do not use AppCompat and Design. Export the Sketchware project In Sketchware, under MY PROJECTS, go to project settings of the app to be exported, and click on  Export to PC (Android Studio) . The exported file is a zip file. Create a new folder...

How to integrate Admob interstitial ads using​ AIDE?

Gambar
AIDE can be used to integrate Admob Ads to a Sketchware project. Follow the steps below to integrate Admob interstitial ads to a sketchware project using AIDE. Prerequisites An Android project (Sketchware project) AIDE with pro account key purchased Account in Google developer console Account in Admob Before placing admob ads in an app, the app needs to be uploaded to google play store, however test ads can be tried in any app. Always place the test ad ID before placing your ad unit ID. App ID and ad unit ID can be obtained by registering the app on Admob. But for using test ads no registration is required. Do not click on your own Ads. Export the Sketchware project In Sketchware, under MY PROJECTS, go to project settings of the app to be exported, and click on  Export to PC (Android Studio) . The exported file is a zip file. Create a new folder and decompress the contents of the zip file in it. Check whether the  res  folder at location  app/src/main/res  conta...

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation