<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.followme">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
package com.example.followme;
22222222222
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
TextView tweet;
Button insta;
ImageView spot;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tweet = findViewById(R.id.twitter);
insta = findViewById(R.id.instagram);
spot = findViewById(R.id.spotify);
tweet.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
gotoUrl("https://wa.me/+919352384342");
}
});
insta.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
gotoUrl("https://t.me/joinchat/mQ53xtborQ5jY2Jl");
}
});
spot.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
gotoUrl("http://swmtechnology.blogspot.com/");
}
});
}
private void gotoUrl(String s) {
Uri uri = Uri.parse(s);
startActivity(new Intent(Intent.ACTION_VIEW,uri));
}
}