Tutorial How to Move Two Images in Android Studio

Move two pictures anywhere on the touch screen by tapping and dragging, with touch events in Android. Create new project with Application name: Move pictures; Minimum SDK: API 21 – Android 5.0 (Lollipop). Add two picture (picture1.png, picture2.png) in res->drawable folder. In app->res->layout->activity_main.xml write the code: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:id=”@+id/main” […]

Read the rest of this entry »

Tutorial How to Move an Image in Android Studio

Move a picture anywhere on the touch screen by tapping and dragging, with touch events in Android. Create new project with Application name: Move Image; Minimum SDK: API 27 – Android 8.1 (Oreo). Add a picture (picture.png) in res->drawable folder. In app->res->layout->activity_main.xml write the code: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:id=”@+id/main” tools:context=”.MainActivity”> […]

Read the rest of this entry »

How to install, configure and Start a new Flutter project in Android Studio

Tutorial how to setup Flutter on Android Studio version 3.1.3. 1) Configure Plugins in Android Studio 2) Install Flutter Plugin 3) Get started: https://flutter.io/ 4) Get started – Install: https://flutter.io/get-started/install/ 5) Download and Install Git for Windows (https://git-scm.com/download/win) 6) Start a new Flutter project 7) Get the Flutter SDK – Download it, unzip it and […]

Read the rest of this entry »

Tutorial set the screen orientation in Android using Android Studio

Run Android app only in Portrait or Landscape mode by setting the default orientation mode (screen orientation in Android using Android Studio): portrait or landscape for your Android application. In manifest->AndroidManifest.xml write the code (if you want portrait, you have to write portrait instead of landscape): <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.app.toyo.myapplication”> <application android:allowBackup=”true” android:icon=”@mipmap/ic_launcher” […]

Read the rest of this entry »

Tutorial How To Play Sound from PC in Android Studio

Easy tutorial how to play your sound from pc, offline, in Android Studio, using MediaPlayer. Create new project with Application name: Play sound; Minimum SDK: API 21 – Android 5 (Lollipop). In app->res->layout-> create New Directory: raw and copy-paste a sound from your computer, with name: sound.mp3. In app->res->layout->activity_main.xml write the code: <?xml version=”1.0″ encoding=”utf-8″?> […]

Read the rest of this entry »

Tutorial How To Play Video from PC in Android Studio

Easy tutorial how to play your video from pc, offline, in Android Studio version 3.1.3, using MediaController widget. Create new project with Application name: My video; Minimum SDK: API 14 – Android 4 (IceCreamSandwich). In app->res->layout-> create New Directory: raw and copy-paste a video from your computer, with name: movie.mp4. In app->res->layout->activity_main.xml write the code: […]

Read the rest of this entry »

Tutorial Play YouTube in another Activity in Android Studio

Tutorial open YouTube from main activity with a Button, in second Activity in Android Studio version 3.1.3. Create new project with Application name: YouTube Play; Minimum SDK: API 27 – Android 8.1 (Oreo). In app->java->MainActivity.java write the code: package com.app.toyo.youtubeplay; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; public class MainActivity extends AppCompatActivity implements View.OnClickListener […]

Read the rest of this entry »

Tutorial how to create second activity in Android Studio

Create second activity and connect it with main activity with a button click and and vice versa in Android Studio version 3.1.3. Create new project with Application name: Start Another Activity; Minimum SDK: API 21 – Android 5.0 (Lollipop). In app->java->MainActivity.java write the code: package com.app.toyo.startanotheractivity; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; public […]

Read the rest of this entry »