पहला पेज
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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"
tools:context=".MainActivity">
<ImageView
android:id="@+id/imageView"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="250dp"
android:layout_marginEnd="250dp"
app:srcCompat="@drawable/logo"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="सरकारी योजना"
android:textColor="@color/black"
android:textSize="40sp"
android:textStyle="bold"
android:textAlignment="center"
android:layout_marginTop="470dp"/>
</RelativeLayout>
दूसरा पेज
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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:orientation="vertical"
tools:context=".MainActivity2">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="अपना आवश्यक विकल्प चुनें"
android:textSize="22sp"
android:textStyle="bold"
android:layout_alignParentTop="true"
android:textAlignment="center" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="430dp"
app:srcCompat="@drawable/yojanalogo" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="सरकारी योजना"
android:layout_marginTop="12dp"
android:textAlignment="center"
android:layout_below="@+id/imageView3"
android:textSize="35sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="सभी योजना को केवल एक ही क्लिक में खोले"
android:textAlignment="center"
android:layout_below="@+id/textView"/>
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
app:srcCompat="@drawable/clicl" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Next"
android:layout_marginStart="75dp"
android:layout_marginEnd="75dp"
android:layout_marginTop="16dp"
android:layout_below="@+id/imageView4"/>
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Not an offical app of any Government/private entity"
android:layout_marginTop="5dp"
android:textAlignment="center"
android:layout_below="@+id/button"/>
</RelativeLayout>
एक पेज से दूसरे पेज पर जाने के लिए
package sarkari.yojana;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity2 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
Button Button = (Button) findViewById(R.id.button);
Button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent= new Intent(MainActivity2.this,MainActivity3.class);
startActivity(intent);
}
});
}
}
Comments
Post a Comment