Sometimes I write, sometimes I write well…:)

We will cover all the basic concepts of C++

Photo by Emile Perron on Unsplash

Welcome to C++

C++ is a popular cross-platform language that can be used to create high-performance applications — operating system, browsers, video-games, art applications and so on.

A C++ program is a collection of commands or statement.

Below is a simple program template:

#include <iostream>
using namespace std;
int main()
return 0…
Photo by Executium on Unsplash

A cryptocurrency, crypto-currency, or crypto is a binary data designed to work as a medium of exchange wherein individual coin ownership records are stored in a ledger existing in a form of computerized database using strong cryptography to secure transaction records, to control the creation of additional coins and to…

Photo by Jefferson Santos on Unsplash

My Idea on a Safe and Peaceful Cyber Space…

Cyber safety is always on the priority of the people of the internet whether it be 2010 or 2021, but the only change that has took place in the last 11 years is the increasing number of hacking and data breaching.

What is Cyber attack?

In computers or computer networks an attack is any…

Create Second Activity

Photo by Sigmund on Unsplash

To create second activity, follow these steps:

  1. In the Project window, right-click app folder and select New > Activity > Empty Actvity.
  2. In the Configure Activity window, enter “DislayMessageActivity” for Activity Name. Leave all the other properties set to their defaults and click Finish.

Android Studio automatically does three things:

  • Create DisplayMessageActivity file.
  • Create the layout file activity_display_message.xml, which corresponds with the DisplayMessageActivity file.
  • Adds the required <activity> element in AndroidManifest.xml.

If you run the app and tap on the button on the first activity, the second activity starts but is empty. This is because the second activity uses the empty layout provided by the template.

Build an Intent

Photo by Pathum Danthanarayana on Unsplash

An Intent is an object that provides runtime binding between separate components, such as two activities. The Intent represents an app’s intent to do something. You can use intents fora a wide varity of tasks, but in this lesson, your intent starts another activity.

In MainActivity, add the EXTRA_MESSAGE constant…

Start another activity

Respond to the Send Button

Follow these steps to add a method to the MainActivity class that’s called when the Send button is tapped:

  1. In the file app > java > com.example.myfirstapp > MainActivity, add the following sendMessage() method stub:
public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main); …

Make the text box size flexible and then run the app…

Photo by Daniel Romero on Unsplash

To create a layout that’s responsive to different screen sizes, you need to make the text box stretch to fill the horizontal space that remains after the button and margins are accounted for.

Before you continue, click (Select Design Surface) in the toolbar and select Blueprint.

To make the text…

Divyendra Rajawat

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store