Widget Recent Post No.

header ads

Android Enquiry Screen | Enquiry From Android Studio



Step 1 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"

    tools:context=".Main.MainActivity">


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

        android:id="@+id/app_bar"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:fitsSystemWindows="true"

        android:theme="@style/Theme.AppCompat.Light"

        android:background="@drawable/centre_background">


        <com.google.android.material.appbar.CollapsingToolbarLayout

            android:id="@+id/toolbar_layout"

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:fitsSystemWindows="true"

            app:contentScrim="?attr/colorPrimary"

            app:layout_scrollFlags="scroll|exitUntilCollapsed">


            <RelativeLayout

                android:layout_width="match_parent"

                android:layout_height="match_parent"

                android:background="@drawable/centre_background">


                <ImageView

                    android:layout_width="wrap_content"

                    android:layout_height="wrap_content"

                    android:layout_alignParentEnd="true"

                    android:layout_alignParentRight="true"

                    android:layout_alignParentBottom="true"

                    android:layout_marginTop="10dp"

                    android:adjustViewBounds="true"

                    android:cropToPadding="true"

                    android:src="@drawable/enq" />


            </RelativeLayout>


            <androidx.appcompat.widget.Toolbar

                android:id="@+id/toolbar"

                android:layout_width="match_parent"

                android:layout_height="?attr/actionBarSize"

                app:layout_collapseMode="pin"

                app:popupTheme="@style/Theme.AppCompat.Light" />


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

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


    <include layout="@layout/content_main" />



</androidx.coordinatorlayout.widget.CoordinatorLayout>


Step 2 content_main.xml


<?xml version="1.0" encoding="utf-8"?>

<androidx.core.widget.NestedScrollView 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:id="@+id/scrollFeed"

    app:layout_behavior="@string/appbar_scrolling_view_behavior"

    tools:showIn="@layout/activity_main"

    android:background="@drawable/centre_background"

    android:focusableInTouchMode="true">


    <androidx.cardview.widget.CardView

        android:id="@+id/personalDetailsCard"

        style="@style/centreLocatorCardDesign"

        android:layout_marginTop="10dp"

        app:cardCornerRadius="16dp"

        app:cardElevation="10dp">


        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:layout_gravity="center"

            android:focusableInTouchMode="false"

            android:orientation="vertical"

            android:padding="20dp">


            <com.google.android.material.textfield.TextInputLayout

                android:id="@+id/txtInputName"

                android:layout_width="match_parent"

                android:layout_height="wrap_content">


                <EditText

                    android:background="@drawable/edit_style"


                    android:id="@+id/txtName"

                    style="@style/modifiedEditText"

                    android:hint="@string/name"

                    android:singleLine="true" />


            </com.google.android.material.textfield.TextInputLayout>



            <com.google.android.material.textfield.TextInputLayout


                android:layout_marginTop="10dp"

                android:id="@+id/txtInputEmail"

                android:layout_width="match_parent"

                android:layout_height="wrap_content">


                <EditText

                    android:background="@drawable/edit_style"

                    android:id="@+id/txtEmail"

                    style="@style/modifiedEditText"

                    android:ems="10"

                    android:hint="@string/email"

                    android:inputType="textEmailAddress" />


            </com.google.android.material.textfield.TextInputLayout>



            <com.google.android.material.textfield.TextInputLayout

                android:layout_marginTop="10dp"

                android:id="@+id/txtInputMob"

                android:layout_width="match_parent"

                android:layout_height="wrap_content">


                <EditText

                    android:background="@drawable/edit_style"

                    android:id="@+id/txtMob"

                    style="@style/modifiedEditText"

                    android:hint="@string/mobno"

                    android:inputType="phone" />

            </com.google.android.material.textfield.TextInputLayout>



            <com.google.android.material.textfield.TextInputLayout

                android:layout_marginTop="10dp"

                android:id="@+id/txtInputReg"

                android:layout_width="match_parent"

                android:layout_height="wrap_content">


                <EditText

                    android:background="@drawable/edit_style"

                    android:id="@+id/txtReg"

                    style="@style/modifiedEditText"

                    android:hint="@string/Location" />


            </com.google.android.material.textfield.TextInputLayout>



            <com.google.android.material.textfield.TextInputLayout

                android:layout_marginTop="10dp"

                android:id="@+id/txtInputFeedback"

                android:layout_width="match_parent"

                android:layout_height="wrap_content">


                <EditText

                    android:background="@drawable/edit_style"

                    android:id="@+id/txtFeed"

                    style="@style/modifiedEditText"

                    android:hint="@string/message"

                    android:inputType="textMultiLine"

                    android:minLines="2" />


            </com.google.android.material.textfield.TextInputLayout>



            <Button

                android:layout_marginTop="60dp"

                android:id="@+id/btnSend"

                android:gravity="center"

                android:layout_width="match_parent"

                android:layout_height="wrap_content"

                android:layout_gravity="right"

                android:background="@drawable/centre_button"

                android:text="@string/send"

                android:textColor="@color/whiteTextColor" />

        </LinearLayout>

    </androidx.cardview.widget.CardView>

</androidx.core.widget.NestedScrollView>


 Step 3 MainActivity.JAVA

package in.learncodewithrk.animatedbottombar.Main;




import androidx.appcompat.app.AppCompatActivity;

import androidx.appcompat.widget.Toolbar;



import android.os.Bundle;



import in.learncodewithrk.animatedbottombar.R;



public class MainActivity extends AppCompatActivity   {



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);


        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

        setSupportActionBar(toolbar);

    }

}


SOURCE : https://user-images.githubusercontent.com/71060268/143540186-eefee3d2-2c9c-4949-9aa5-44ef50959e00.png

GITHUB : https://github.com/LearncodeWithRk/Enquiry-From


Post a Comment

0 Comments