1. Social Media Logo க்களை app>res>drawable past செய்த பின்னர் கீழ் வரும் படிமுறைகளை பின்பற்றுங்கள்.
2. app >res>layout> activity_main க்கு சென்று கீழே தரப்பட்டுள்ள Code ஐ உள்ளீடு செய்வுங்கள்.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="414dp"
android:layout_height="229dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/logo" />
<ImageButton
android:id="@+id/websiteBtn"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="5dp"
android:background="@drawable/web_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<ImageButton
android:id="@+id/facebookBtn"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="5dp"
android:layout_marginTop="16dp"
android:background="@drawable/facebook_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/websiteBtn" />
<ImageButton
android:id="@+id/TwiterBtn"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="5dp"
android:background="@drawable/twiter_icon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/InstagramBtn"
app:layout_constraintVertical_bias="0.0" />
<ImageButton
android:id="@+id/InstagramBtn"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="5dp"
android:background="@drawable/instagram_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/facebookBtn" />
</androidx.constraintlayout.widget.ConstraintLayout>
3. app > java> main> MainActivity க்கு சென்று கீழே தரப்பட்டுள்ள Code ஐ உள்ளீடு செய்யுங்கள்.
package mit.solution.apps;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import java.io.IOException;
import static android.net.wifi.WifiConfiguration.Protocol.strings;
public class MainActivity extends AppCompatActivity {
ImageButton FacebookBtn, TwiterBtn, InstagramBtn, WebsiteBtn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FacebookBtn = findViewById(R.id.facebookBtn);
TwiterBtn = findViewById(R.id.TwiterBtn);
InstagramBtn = findViewById(R.id.InstagramBtn);
WebsiteBtn = findViewById(R.id.websiteBtn);
FacebookBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent Url_Open = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/macitsolutionlk"));
startActivity (Url_Open);
}
});
TwiterBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent Url_Open = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/suganthan130"));
startActivity (Url_Open);
}
});
InstagramBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent Url_Open = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.instagram.com/suganthan_kumaralingam/"));
startActivity (Url_Open);
}
});
WebsiteBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent Url_Open = new Intent(Intent.ACTION_VIEW, Uri.parse("https://mitsolutiontamil1.blogspot.com/"));
startActivity (Url_Open);
}
});
}
}


கருத்துரையிடுக