Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adi: first commit with comments only. #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
31 changes: 30 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ dependencies {
compile 'com.github.mancj:SlideUp-Android:1.0-beta'
testCompile 'junit:junit:4.12'
compile project(':library')

//Loading Image
implementation 'com.squareup.picasso:picasso:2.5.2'

//Circular Images
compile 'com.github.abdularis:CircularImageView:v1.2'
}
28 changes: 15 additions & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:theme="@style/AppTheme"
tools:replace="android:label">
<activity
android:name="com.aryan.android.oyo.MainActivity"
android:name=".MainActivity"
android:theme="@style/noAnimTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -23,39 +23,41 @@
</intent-filter>
</activity>
<activity
android:name="com.aryan.android.oyo.FirstRunOneActivity"
android:name=".FirstRunOneActivity"
android:screenOrientation="portrait"
android:theme="@style/FirstRumTheme" />
<activity
android:name="com.aryan.android.oyo.FirstRunSecondActivity"
android:name=".FirstRunSecondActivity"
android:label=" "
android:parentActivityName="com.aryan.android.oyo.FirstRunOneActivity"
android:parentActivityName=".FirstRunOneActivity"
android:screenOrientation="portrait"
android:theme="@style/FirstRumTheme" />
<activity
android:name="com.aryan.android.oyo.FirstRunThirdActivity"
android:name=".FirstRunThirdActivity"
android:label=" "
android:parentActivityName="com.aryan.android.oyo.FirstRunSecondActivity"
android:parentActivityName=".FirstRunSecondActivity"
android:screenOrientation="portrait"
android:theme="@style/FirstRumTheme"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.aryan.android.oyo.FirstActivity"
android:name=".FirstActivity"
android:theme="@style/FirstRumTheme" />
<activity
android:name="com.aryan.android.oyo.SearchActivity1"
android:name=".SearchActivity1"
android:theme="@style/FirstRumTheme" />
<activity
android:name="com.aryan.android.oyo.SetDatesActivity"
android:name=".SetDatesActivity"
android:theme="@style/FirstRumTheme" />
<activity
android:name="com.aryan.android.oyo.HotelsActivity"
android:name=".HotelsActivity"
android:theme="@style/FirstRumTheme" />
<activity
android:name="com.aryan.android.oyo.HotelActivity"
android:name=".HotelActivity"
android:theme="@style/FirstRumTheme" />
<activity android:name="com.aryan.android.oyo.HotelActivity_1"
android:theme="@style/FirstRumTheme1"></activity>
<activity
android:name=".HotelActivity_1"
android:theme="@style/FirstRumTheme1" />
<activity android:name=".user_profile"></activity>
</application>

</manifest>
20 changes: 20 additions & 0 deletions app/src/main/java/com/aryan/android/oyo/YouFragment.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.aryan.android.oyo;


import android.content.Intent;
import android.os.Bundle;
import android.app.Fragment;
import android.support.annotation.Nullable;
Expand All @@ -10,6 +11,7 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

/**
Expand All @@ -18,6 +20,7 @@
public class YouFragment extends Fragment {


private TextView openProfile;
private TextView mTitleTextView;

public static YouFragment newInstance() {
Expand All @@ -26,6 +29,8 @@ public static YouFragment newInstance() {
return fragment;
}



@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -47,9 +52,20 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
((AppCompatActivity)getActivity()).getSupportActionBar().setDisplayShowHomeEnabled(true);
}

//open profile
openProfile = (TextView) view.findViewById(R.id.profile);
openProfile.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Intent i = new Intent(YouFragment.this.getActivity(),user_profile.class);
startActivity(i);
}
});
mTitleTextView = view.findViewById(R.id.you_title);
mTitleTextView.setText(HomeFragment.mwelcomeMessageTxtView.getText());
return view;

}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
Expand All @@ -64,4 +80,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
}





}
126 changes: 126 additions & 0 deletions app/src/main/java/com/aryan/android/oyo/user_profile.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
package com.aryan.android.oyo;

import android.content.Intent;
import android.database.Cursor;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.aryan.android.oyo.R;
import com.squareup.picasso.Picasso;

public class user_profile extends AppCompatActivity implements View.OnClickListener {


int i;
private Button EditProfile;
private Button logout;
private EditText name;
private EditText email_id;
private EditText mobile_number;
private EditText aadhar_number;
private EditText address;
private static int RESULT_LOAD_IMAGE = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);


Button buttonLoadImage = (Button) findViewById(R.id.buttonLoadPicture);
buttonLoadImage.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View arg0) {

Intent i = new Intent(
Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);

startActivityForResult(i, RESULT_LOAD_IMAGE);
}
});


logout = (Button) findViewById(R.id.logout);
name = (EditText) findViewById(R.id.name);
email_id = (EditText) findViewById(R.id.email_id);
mobile_number = (EditText) findViewById(R.id.mobile_number);
aadhar_number = (EditText) findViewById(R.id.aadhar_number);
address = (EditText) findViewById(R.id.address);


EditProfile = findViewById(R.id.edit_profile);
EditProfile.setOnClickListener(this);
}


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == RESULT_LOAD_IMAGE) {

Uri selectedImageURI = data.getData();

Picasso.with(user_profile.this).load(selectedImageURI).noPlaceholder().centerCrop().fit()
.into((ImageView) findViewById(R.id.imgView));
}

}
}

@Override
public void onClick(View view)
{
switch (view.getId()) {
case R.id.edit_profile:
// Do something

//Intent intent = new Intent(MainActivity.this , edit_profile.class);
//startActivity(intent);

if(i==1)
{
name.setEnabled(true);
email_id.setEnabled(true);
mobile_number.setEnabled(true);
aadhar_number.setEnabled(true);
address.setEnabled(true);
EditProfile.setText("SAVE");
logout.setText("CHANGE PIC");
i=0;
break;
}
if(i==0)
{
name.setEnabled(false);
email_id.setEnabled(false);
mobile_number.setEnabled(false);
aadhar_number.setEnabled(false);
address.setEnabled(false);
name.setText(name.getText());
email_id.setText(email_id.getText());
mobile_number.setText(mobile_number.getText());
aadhar_number.setText(aadhar_number.getText());
address.setText(address.getText());
EditProfile.setText("EDIT PROFILE");
i=1;
break;
}


}
}



}
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/profilegradientbackground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<gradient android:angle="45"
android:startColor="@color/startblue"
android:endColor="@color/endblue"
/>

</shape>
26 changes: 26 additions & 0 deletions app/src/main/res/layout-v16/a_scene.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">

<!--<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:tint="#FFFFFF"/>-->

<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:layout_centerInParent="true"
android:textColor="#FFFFFF"
android:fontFamily="monospace"
android:drawablePadding="10dp"
/>

</RelativeLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/a_scene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15dp"
android:textSize="15sp"
android:layout_centerInParent="true"
android:textColor="#FFFFFF"
android:fontFamily="monospace"
android:drawablePadding="10dp"
android:background="@drawable/profilegradientbackground"
/>

</RelativeLayout>
4 changes: 4 additions & 0 deletions app/src/main/res/layout/activity_first.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
android:animateLayoutChanges="true">

</FrameLayout>
<!--region Description-->
End of frame layout
<!--endregion-->

<android.support.design.widget.BottomNavigationView
android:id="@+id/bottomnav"
android:layout_width="match_parent"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_hotels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
android:textColor="#000000"
android:textStyle="bold"
android:background="@android:color/transparent"
android:textSize="15sp"
/>
android:textSize="15sp" />
</android.support.v7.widget.Toolbar>

<android.support.v7.widget.RecyclerView
Expand Down
Loading