Tuesday, 29 August 2017

Costume Sign Up With Navigation design

Navigation Screen XML



<?xml version="1.0" encoding="utf-8"?><android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/drawer_layout"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:background="@android:color/white">

    <LinearLayout        android:id="@+id/linear_main_view"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:orientation="vertical">

        <include            android:id="@+id/header"            layout="@layout/extra_header" />

        <FrameLayout            android:id="@+id/frame_layout"            android:layout_width="match_parent"            android:layout_height="match_parent">

        </FrameLayout>


    </LinearLayout>

    <ScrollView        android:id="@+id/linear_navigation"        android:layout_width="280dp"        android:layout_height="match_parent"        android:layout_gravity="start"        android:background="@android:color/white">
        <!--  android:layout_gravity="start"        -->        <LinearLayout            android:layout_width="match_parent"            android:layout_height="match_parent"            android:orientation="vertical">

            <LinearLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:background="@drawable/img"                android:gravity="center"                android:orientation="vertical">

                <TextView                    android:id="@+id/txtusername"                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_marginTop="5dp"                    android:text="Virat"                    android:textColor="@android:color/white"                    android:textSize="20sp" />

                <TextView                    android:id="@+id/txtuseremail"                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_marginTop="5dp"                    android:text="aashusonava@gmail.com"                    android:textColor="@android:color/white"                    android:textSize="16sp" />


            </LinearLayout>


            <LinearLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:orientation="vertical">

                <LinearLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:orientation="horizontal">

                    <TextView                        android:id="@+id/txt_home"                        android:layout_width="0dp"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:drawableTop="@drawable/home_selector"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="Home"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />

                    <TextView                        android:id="@+id/txt_profile"                        android:layout_width="0dp"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:drawableTop="@drawable/profile_seloctor"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="My Profile"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />
                </LinearLayout>

                <View                    android:layout_width="match_parent"                    android:layout_height="3px"                    android:background="#eef1f3" />

                <LinearLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:orientation="horizontal">

                    <TextView                        android:id="@+id/txt_inscalculator"                        android:layout_width="0dp"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:drawableTop="@drawable/calculator_selector"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="Instagram Calculator"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />

                    <TextView                        android:id="@+id/txt_request"                        android:layout_width="0dp"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:drawableTop="@drawable/requesr_selector"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="Request for Appearance"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />


                </LinearLayout>

                <View                    android:layout_width="match_parent"                    android:layout_height="3px"                    android:background="#eef1f3" />

                <LinearLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:orientation="horizontal">


                    <TextView                        android:id="@+id/txt_feedback"                        android:layout_width="0dp"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:drawableTop="@drawable/feedback_selector"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="Feedback"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />

                    <TextView                        android:id="@+id/txt_changepass"                        android:layout_width="0dp"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:drawableTop="@drawable/changepass_selector"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="Change Password"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />

                </LinearLayout>

                <View                    android:layout_width="match_parent"                    android:layout_height="3px"                    android:background="#eef1f3" />

                <LinearLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:orientation="horizontal">

                    <TextView                        android:id="@+id/txt_logout"                        android:layout_width="150dp"                        android:layout_height="wrap_content"                        android:drawableTop="@drawable/logout_selector"                        android:gravity="center_horizontal"                        android:paddingBottom="20dp"                        android:paddingTop="20dp"                        android:text="Logout"                        android:textColor="@drawable/home_selector_color"                        android:textSize="16sp" />


                </LinearLayout>

                <View                    android:layout_width="match_parent"                    android:layout_height="3px"                    android:background="#eef1f3" />


            </LinearLayout>
        </LinearLayout>
    </ScrollView>


</android.support.v4.widget.DrawerLayout>





Extra Header Xml File

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="?attr/actionBarSize"    android:background="@android:color/white"    android:elevation="6dp"    android:gravity="center_vertical"    android:orientation="horizontal"    android:padding="10dp">

    <ImageView        android:id="@+id/img_menu"        android:layout_width="30dp"        android:layout_height="wrap_content"        android:src="@drawable/menu" />

    <TextView        android:id="@+id/txttool"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_gravity="center_horizontal"        android:layout_marginRight="10dp"        android:gravity="center_horizontal"        android:text="Home"        android:textColor="@color/topbartext"        android:textSize="20dp" />


</LinearLayout>

Selector Xml

<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item        android:drawable="@mipmap/home_wellact"        android:state_selected="true"        android:text="SECOND">

    </item>

    <item        android:drawable="@mipmap/home_wellact"        android:state_pressed="true"        android:text="SECOND">

    </item>

    <item android:drawable="@mipmap/homewell">

    </item>

</selector>



Profile Xml

<?xml version="1.0" encoding="utf-8"?><LinearLayout 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:id="@+id/layout"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:background="@android:color/white"    android:orientation="vertical">


    <ScrollView        android:layout_width="fill_parent"        android:layout_height="fill_parent"        android:layout_alignParentBottom="true"        android:layout_alignParentLeft="true"        android:layout_alignParentStart="true"        android:layout_below="@+id/toolbar"        android:fitsSystemWindows="true">


        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_below="@+id/img"            android:orientation="vertical">

            <FrameLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_gravity="center"                android:background="@drawable/img"                android:padding="10dp">


                <de.hdodenhof.circleimageview.CircleImageView                    android:id="@+id/ivImage"                    android:layout_width="100dp"                    android:layout_height="100dp"                    android:layout_gravity="center_horizontal"                    android:layout_margin="10sp"                    android:src="@drawable/dummy_user"                    android:textColor="@android:color/white"                    android:textSize="30sp" />

                <ImageView                    android:id="@+id/image"                    android:layout_width="20dp"                    android:layout_height="20dp"                    android:layout_gravity="center_horizontal"                    android:layout_marginLeft="40dp"                    android:layout_marginTop="15dp"                    android:src="@drawable/edit" />

                <TextView                    android:id="@+id/txtuser"                    android:layout_width="match_parent"                    android:layout_height="100dp"                    android:layout_gravity="center_vertical"                    android:layout_marginTop="55dp"                    android:gravity="center"                    android:text="John Sinha"                    android:textColor="@android:color/white" />
            </FrameLayout>


            <TextView                android:id="@+id/txtnotofiedone"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_marginLeft="16sp"                android:layout_marginRight="16sp"                android:layout_marginTop="10dp"                android:gravity="center"                android:text="@string/home1"                android:textColor="@color/topbartext"                android:textSize="14sp" />

            <TextView                android:id="@+id/txtnotofiedone1"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_marginLeft="16sp"                android:layout_marginRight="16sp"                android:layout_marginTop="10dp"                android:gravity="center"                android:text="@string/home2"                android:textColor="@color/topbartext"                android:textSize="14sp" />

            <TextView                android:id="@+id/txtnotofiedone2"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_marginLeft="16sp"                android:layout_marginRight="16sp"                android:layout_marginTop="10dp"                android:gravity="center"                android:text="@string/home3"
                android:textColor="@color/topbartext"                android:textSize="14sp" />

            <LinearLayout                android:layout_width="match_parent"                android:layout_height="100dp"                android:layout_below="@+id/img"                android:layout_marginLeft="16sp"                android:layout_marginRight="16sp"                android:layout_marginTop="20dp"                android:background="@drawable/rounded_corner"                android:orientation="horizontal">

                <de.hdodenhof.circleimageview.CircleImageView                    android:layout_width="50dp"                    android:layout_height="50dp"                    android:layout_gravity="center"                    android:src="@drawable/instagram_btn" />

                <TextView                    android:id="@+id/txtone"                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_gravity="center"                    android:layout_marginLeft="10dp"                    android:hint="@string/hometext3"                    android:textSize="16sp" />
            </LinearLayout>

            <Button                android:id="@+id/btnupdateone"                android:layout_width="100dp"                android:layout_height="wrap_content"                android:layout_gravity="right"                android:layout_marginBottom="10dp"                android:layout_marginRight="16sp"                android:layout_marginTop="5dp"                android:background="@drawable/rounded_button"                android:text="@string/update"                android:textAllCaps="false"                android:textColor="@color/inputboxbg" />

            <LinearLayout                android:layout_width="match_parent"                android:layout_height="100dp"                android:layout_below="@+id/img"                android:layout_marginLeft="16sp"                android:layout_marginRight="16sp"                android:layout_marginTop="20dp"                android:background="@drawable/rounded_corner"                android:orientation="horizontal">

                <de.hdodenhof.circleimageview.CircleImageView                    android:layout_width="50dp"                    android:layout_height="50dp"                    android:layout_gravity="center"                    android:src="@drawable/appearance" />

                <TextView                    android:id="@+id/txttwo"                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_gravity="center"                    android:layout_marginLeft="10dp"                    android:text="@string/hometext4"                    android:textSize="16sp" />
            </LinearLayout>

            <Button                android:id="@+id/btnupdatetwo"                android:layout_width="100dp"                android:layout_height="wrap_content"                android:layout_gravity="right"                android:layout_marginBottom="20dp"                android:layout_marginRight="16sp"                android:layout_marginTop="5dp"                android:background="@drawable/rounded_button"                android:text="@string/update"                android:textAllCaps="false"                android:textColor="@color/inputboxbg" />

            <TextView                android:id="@+id/treamhome"                android:layout_width="fill_parent"                android:layout_height="wrap_content"                android:layout_marginBottom="20dp"                android:layout_marginTop="20dp"                android:gravity="center"                android:padding="10dp"                android:textSize="16dip" />

        </LinearLayout>


    </ScrollView>
</LinearLayout>


case R.id.map:
    if (!service.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
        showSettingsAlert();
    } else {
        PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
        try {
            startActivityForResult(builder.build
((AppCompatActivity) getActivity()), PLACE_PICKER_REQUEST);
        } catch (GooglePlayServicesRepairableException e) {
            e.printStackTrace();
        } catch (GooglePlayServicesNotAvailableException e) {
            e.printStackTrace();
        }
    }
    break;
case R.id.edtsubrub:
    try {
        Intent intent =
                new PlaceAutocomplete
                        .IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN)
                        .build(getActivity());
        startActivityForResult(intent, 1);
    } catch (GooglePlayServicesRepairableException e) {
    } catch (GooglePlayServicesNotAvailableException e) {
    }
    break;




public void showSettingsAlert() {
    AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
    alertDialog.setTitle("GPS settings");
    alertDialog.setMessage("Location is not enabled. Do you want to go to settings menu?");
    alertDialog.setPositiveButton("Settings",
            new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    Intent intent = new Intent(
                            Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                    getActivity().startActivity(intent);
                }
            });
    alertDialog.setNegativeButton("Cancel",
            new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    dialog.cancel();
                }
            });
    alertDialog.show();
}


public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == 1) {
        if (resultCode == getActivity().RESULT_OK) {
            place = PlaceAutocomplete.getPlace(getActivity(), data);
            Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());
            List<android.location.Address> addresses;
            try {
                addresses = geocoder.getFromLocation(
                        place.getLatLng().latitude,
                        place.getLatLng().longitude,
                        1);
                if (addresses.size() > 0) {
                    String city;
                    String ZIP;
                    String country;
                    String state;

                    if (addresses.get(0).getLocality() != null) {
                        city = addresses.get(0).getLocality();
                        edtsubrub.setText(city);
                    }
                    if (addresses.get(0).getPostalCode() != null) {
                        ZIP = addresses.get(0).getPostalCode();
                        edtpostcode.setText(ZIP);
                    }
                    if (addresses.get(0).getCountryName() != null) {
                        country = addresses.get(0).getCountryName();
                        edtcountry.setText(country);
                    }
                    if (addresses.get(0).getAdminArea() != null) {
                        state = addresses.get(0).getAdminArea();
                        edtstate.setText(state);
                    }
                }

            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {
        Status status = PlaceAutocomplete.getStatus(getActivity(), data);
    } else if (resultCode == getActivity().RESULT_CANCELED) {
    }
}

2 comments:

  1. Las Vegas Casino, Hotel, and Tours - JTM Hub
    Explore the Jumba 경상북도 출장안마 Casino in 수원 출장마사지 Las Vegas, Nevada. Get information, 논산 출장마사지 directions, reviews and more for the Las Vegas 군포 출장마사지 Casino in 정읍 출장안마 Las Vegas,

    ReplyDelete