Create Android Screen Recorder Application

Create Android Screen Recorder Application – In this tutorial i will show how to create screen recorder application in android studio. In google play store there are more screen recorder application will be there, if you also wish to publish your app in play store. We strongly recommend this screen recorder android application. Just download the project and import from your device after that launch your app in google play store.

Currently screen recorder app has more demands. Because now YouTube application is very trending & the creators are looking for best screen recorder software for upload the videos and audio files. Therefore most of developers are starts to create screen recording apps.

Nowadays Screen Recorder is one of the best android app, because most of developers and some students are used screen recorder application for capture the videos. That’s why here i have develop the android screen recorder application. It’s very helpful for college students and some of android developers.

Create Android Screen Recorder Application

Let’s start to develop the android screen recorder application. As usual File=>Create New project and choose Empty Activity after creating the project just open the default class of MainActivity.java and add the following below code,

MainActivity.java

package com.orpheusdroid.screenrecorder.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.orpheusdroid.screenrecorder.R;

import java.util.ArrayList;

import androidx.recyclerview.widget.RecyclerView;


public class AppsListFragmentAdapter extends RecyclerView.Adapter<AppsListFragmentAdapter.SimpleViewHolder> {
    private ArrayList<Apps> apps;
    private OnItemClicked onClick;

    public AppsListFragmentAdapter(ArrayList<Apps> apps) {
        this.apps = apps;
    }

    @Override
    public SimpleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.content_apps_list_preference, parent, false);
        return new SimpleViewHolder(view);
    }

    @Override
    public void onBindViewHolder(final SimpleViewHolder holder, final int position) {
        Apps app = apps.get(holder.getAdapterPosition());
        holder.textView.setText("" + app.getAppName());
        holder.appIcon.setImageDrawable(app.getAppIcon());

        // Show a visible tick mark for the selected app
        if (app.isSelectedApp())
            holder.selectedApp.setVisibility(View.VISIBLE);
        else
            holder.selectedApp.setVisibility(View.INVISIBLE);
        holder.app.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                onClick.onItemClick(holder.getAdapterPosition());
            }
        });
    }

    @Override
    public int getItemCount() {
        return apps.size();
    }

    public void setOnClick(OnItemClicked onClick) {
        this.onClick = onClick;
    }

    // Interface to handle recycler view item click
    public interface OnItemClicked {
        void onItemClick(int position);
    }

    // A static view holder class to hold the view items used by the recycler view
    static class SimpleViewHolder extends RecyclerView.ViewHolder {
        TextView textView;
        ImageView appIcon;
        ImageView selectedApp;
        RelativeLayout app;

        SimpleViewHolder(View itemView) {
            super(itemView);
            textView = itemView.findViewById(R.id.appName);
            appIcon = itemView.findViewById(R.id.appIcon);
            selectedApp = itemView.findViewById(R.id.appChecked);
            app = itemView.findViewById(R.id.app);
        }
    }
}

In this project we need to develop more java classes because android screen recorder application is not an simple process to accomplish the android app. So here i have not explain the all java classes, because spaces are not enough to complete so finally i give the full source code of android screen recorder application you can download that project.

After that integrate all java classes with XML files to make android screen recorder application in android studio. In below i will explain the XML files to how integrate java files with xml activity layouts. We need also more xml files as like java files.

Activity Layouts

Open the under path of res =>layout =>activity_main.xml file and add the following below XML code to make perfect UI design of android screen recorder application.

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context="com.orpheusdroid.screenrecorder.ui.MainActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            android:theme="?attr/toolbarStyle"
            app:popupTheme="@style/AppTheme.PopupOverlay.Light" />

        <com.google.android.material.tabs.TabLayout
            android:id="@+id/tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="?attr/tabBarStyle"
            app:tabMode="fixed"
            app:tabGravity="fill"/>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.viewpager.widget.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"  />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        app:srcCompat="@drawable/fab_record" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Additionally need more XML files because already we create many java classes so here create xml files as like same of java classes and the code process is very long and already i’ll told finally i give full source code of android screen recorder application.

Download Source Code

Click below to get the full source code of Android Screen Recorder Application. Moreover you can also deploy this code on play store and through this you can able to make money online. First download the code and test on your devices, after that go on other features.

Create Android Screen Recorder Application

Leave a Reply