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

Added Profile page #61

Open
wants to merge 63 commits into
base: profile-page
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7dcd643
sign and login layout modifications
Apr 12, 2018
e816ed9
Change sign and login layout
Apr 12, 2018
a08f7b1
Merge branch 'master' of https://github.com/UdacityAndroidBasicsSchol…
Apr 13, 2018
3675e34
Merge branch 'master' of https://github.com/UdacityAndroidBasicsSchol…
Apr 13, 2018
b3a980e
update .gitignore
sabdar18 Apr 17, 2018
5cd68e6
Added recycler view to quiz activity
DSdatsme Apr 17, 2018
d468293
beautified listItem
DSdatsme Apr 17, 2018
391c422
added layouts to Activity
DSdatsme Apr 17, 2018
b964747
delete .idea files
sabdar18 Apr 18, 2018
8d91c22
remove .idea files
sabdar18 Apr 18, 2018
07bf17a
delete .idea files
sabdar18 Apr 18, 2018
e9e4f7c
delete unwanted files
sabdar18 Apr 18, 2018
70033ce
delete junk files
sabdar18 Apr 18, 2018
36dcd6f
update CONTRIBUTING.md
sabdar18 Apr 18, 2018
443b365
remove same code for back to login activity
sabdar18 Apr 18, 2018
b275f4c
added fix to git
DSdatsme Apr 18, 2018
fd6a8cb
Merge branch 'UdactyAndroidBasicsScholarshigbranch2ct' into branch2
DSdatsme Apr 18, 2018
e51cf02
Added Splash Screen
Apr 18, 2018
f4914e0
Merge pull request #35 from RitikKhare/branch2
sabdar18 Apr 19, 2018
cc17ea5
Merge pull request #33 from sabdar18/branch2
sabdar18 Apr 19, 2018
44e84ba
update dependencies from 12.0.1 to 15.0.0
sabdar18 Apr 19, 2018
66dfdfa
Merge pull request #36 from sabdar18/branch2
sabdar18 Apr 19, 2018
cd67801
Add splash Activity
sabdar18 Apr 19, 2018
f942692
Merge pull request #37 from sabdar18/branch2
sabdar18 Apr 19, 2018
857d600
Merge branch 'branch2' into branch2
DSdatsme Apr 19, 2018
c68149d
decreased LOC
DSdatsme Apr 19, 2018
2936cf5
Merge branch 'branch2' of https://github.com/DSdatsme/audacity into b…
DSdatsme Apr 19, 2018
96c3c3c
Sign out user properly.
amCap1712 Apr 20, 2018
117873f
Adapters,Models, UI Enhancements For Fragments
inaseem Apr 20, 2018
c0992be
Merge branch 'branch2' of https://github.com/DSdatsme/audacity into p…
inaseem Apr 20, 2018
5a98c43
Merge pull request #34 from DSdatsme/branch2
inaseem Apr 20, 2018
bbf98c7
Revert "Recycle Views in all fagments"
inaseem Apr 20, 2018
289beef
Merge pull request #43 from UdacityAndroidBasicsScholarship/revert-34…
inaseem Apr 20, 2018
7adfac6
Merge pull request #42 from kartikohri1712/master
sabdar18 Apr 21, 2018
f87a8f2
update readme with neccessary changes
mohancm Apr 21, 2018
caa77b5
Merge pull request #1 from UdacityAndroidBasicsScholarship/branch2
amCap1712 Apr 21, 2018
5bd24a7
Merge branch 'branch2' into master
amCap1712 Apr 21, 2018
4697b09
Merge pull request #2 from kartikohri1712/master
amCap1712 Apr 21, 2018
0c52b4d
Revert "Sign out user properly"
amCap1712 Apr 21, 2018
afa8027
Merge pull request #3 from kartikohri1712/revert-2-master
amCap1712 Apr 21, 2018
52044d1
Revert "Branch2"
amCap1712 Apr 21, 2018
b3a406e
Merge pull request #4 from kartikohri1712/revert-1-branch2
amCap1712 Apr 21, 2018
89c36d3
remove same code for back to login activity
sabdar18 Apr 18, 2018
f4ed811
update dependencies from 12.0.1 to 15.0.0
sabdar18 Apr 19, 2018
e056c9b
Add splash Activity
sabdar18 Apr 19, 2018
941c425
Merge remote-tracking branch 'origin/branch2' into branch2
amCap1712 Apr 21, 2018
aabf923
Sign out user properly.
amCap1712 Apr 21, 2018
8d19e2d
corrected spelling mistake.\
Yashsonisoni May 3, 2018
a315e74
corrected spelling mistake.
Yashsonisoni May 3, 2018
eeb7ad5
Merge pull request #59 from Yashsonisoni/master
sabdar18 May 4, 2018
a40e0d4
Add google_sans fonts
mohancm May 6, 2018
5bbc62f
Add Hello TextView to Navigation dashboard Header
mohancm May 6, 2018
695e896
Add Cardview to sign in button
mohancm May 6, 2018
756e6db
Update README.md
lifeLessCoder May 7, 2018
12d18d3
Home Screen, Hottest app Screen , Challenges app Screens connected wi…
sabdar18 May 14, 2018
a3c0cb8
Merge branch 'master' of https://github.com/UdacityAndroidBasicsSchol…
sabdar18 May 14, 2018
ea01e52
Merge branch 'master' of https://github.com/UdacityAndroidBasicsSchol…
sabdar18 May 14, 2018
f6c8639
Merge pull request #64 from sabdar18/master
sabdar18 May 14, 2018
3c85596
Update README.md
sroy8091 May 14, 2018
32eb84d
Fixed typo in README file
Abdulkadir98 Oct 4, 2018
98f2ac6
Added the track name
ApoorvaTiwari Oct 30, 2018
a17e7a1
Merge pull request #69 from ApoorvaTiwari/master
mohancm Oct 30, 2018
cc1bcda
Merge pull request #68 from Abdulkadir98/typofix
mohancm Oct 30, 2018
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Created by https://www.gitignore.io/api/androidstudio

### AndroidStudio ###
Expand Down
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# audacity
# Audacity -A Collabrative Project under Udacity Scholarship Programme

Giving The Community A Common Platform Where Student's, Developers Together Can Showcase Their Work And Build Their Personal Portfolio. Feel Free To Share And Experience Everything Around Udacity
Brief Idea:
'Giving The Community A Common Platform Where Students, Developers together can Showcase their work And build their Personal Portfolio. Feel Free To Share And Experience Everything Around Udacity`

## Disclaimer
> `This project is only for the students who participated in Udacity Scholarship Programme (Android Basics Course).`

## What's Included?
<ol>
Expand All @@ -10,27 +14,28 @@ Giving The Community A Common Platform Where Student's, Developers Together Can
<li>Results</li>
</ol>

## Future Addons
## Future Add-ons
<ol>
<li>Git Integration</li>
<li>Slack Channel</li>
<li>Quizzes</li>
<li>Popular Apps</li>
</ol>

## Maintainers
<ul>
<li>Kshitij Suri</li>
<li>pallab (Pallab Kalita)</li>
<li>maddySmith (Maddala Krishnachaitanya)</li>
<li>SABDAR SHAIK</li>
<li>thisismenaseem</li>
<li>Suhanshu Patel</li>
<li>Mohan Cm</li>
</ul>
## Project Maintained by:

* [Kshitij Suri](https://github.com/kshitijsuri90)
* [pallab (Pallab Kalita)](#)
* [maddySmith (Maddala Krishnachaitanya)](https://github.com/sloth-grrr)
* [SABDAR SHAIK](https://github.com/sabdar18)
* [Suhanshu Patel](https://github.com/Suhanshu123)
* [Mohan Cm](https://github.com/mohancm)
* [Naseem](https://github.com/naseemali925)
* [Ankush S Shetkar](https://github.com/lifeLessCoder)
* [Sumit Roy(sroy)](https://github.com/sroy8091)

## Contributors
All Google Udacity Andriod Basics Scholars are eligible to Contribute.
All Google Udacity Android Basics Scholars are eligible to Contribute.
Please Read The Contributing Guide <a href="https://github.com/UdacityAndroidBasicsScholarship/audacity/blob/master/CONTRIBUTING.md"> Here </a>

## How You Can Contribute? ##
Expand Down Expand Up @@ -120,7 +125,7 @@ Now, it may be desirable to squash some of your smaller commits down into a smal

```shell
# Rebase all commits on your development branch
git checkout
git checkout
git rebase -i master
```

Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'


implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.0'

// Android Support Libraries
implementation 'com.android.support:recyclerview-v7:27.1.1'
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".LoginActivity">
<activity android:name=".SplashActivity" android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -20,6 +20,8 @@
</activity>
<activity android:name=".DashboardActivity" />
<activity android:name=".SettingsActivity" />
<activity android:name=".LoginActivity" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
import com.example.android.audacity.fragments.HottestAppFragment;
import com.example.android.audacity.fragments.QuizzesFragment;
import com.example.android.audacity.fragments.ResultsFragment;
import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;

Expand All @@ -30,6 +33,8 @@ public class DashboardActivity extends AppCompatActivity implements NavigationVi
private DrawerLayout mDrawer;
private NavigationView mNavigationView;
private FirebaseAuth mFirebaseAuth;
private GoogleSignInClient mGoogleSignInClient;
private GoogleSignInOptions gso;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -38,10 +43,16 @@ protected void onCreate(Bundle savedInstanceState) {

mFirebaseAuth = FirebaseAuth.getInstance();
if (mFirebaseAuth == null) {
startActivity(new Intent(this, LoginActivity.class));
finish();

navigateToLogin();
}

gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();

mGoogleSignInClient = GoogleSignIn.getClient(this, gso);

Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
mDrawer = findViewById(R.id.drawer_layout);
Expand Down Expand Up @@ -140,15 +151,20 @@ public boolean onOptionsItemSelected(MenuItem item) {
break;
case R.id.nav_sign_out:
if (mFirebaseAuth != null) {
mGoogleSignInClient.signOut();
mFirebaseAuth.signOut();
Intent intent1 = new Intent(DashboardActivity.this, LoginActivity.class);
startActivity(intent1);
finish();
navigateToLogin();
}
break;
default:
break;
}
return super.onOptionsItemSelected(item);
}

private void navigateToLogin() {
Intent intent = new Intent(DashboardActivity.this, LoginActivity.class);
startActivity(intent);
finish();
}
}
17 changes: 7 additions & 10 deletions app/src/main/java/com/example/android/audacity/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.auth.api.signin.GoogleSignInResult;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.SignInButton;
import com.google.android.gms.common.api.ApiException;
import com.google.android.gms.common.api.GoogleApi;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthCredential;
Expand All @@ -32,7 +26,7 @@ public class LoginActivity extends AppCompatActivity implements View.OnClickList

private static final String TAG = LoginActivity.class.getSimpleName();
private FirebaseAuth mFirebaseAuth;
private SignInButton googleSignInButton;
private SignInButton mGoogleSignInButton;
private GoogleSignInClient mGoogleSignInClient;
private static final int RC_SIGN_IN = 1012;

Expand All @@ -54,8 +48,11 @@ protected void onCreate(Bundle savedInstanceState) {
showDashboard();
}

googleSignInButton = findViewById(R.id.google_sign_in_button);
googleSignInButton.setOnClickListener(this);
mGoogleSignInButton = findViewById(R.id.google_sign_in_button);
mGoogleSignInButton.setSize(SignInButton.SIZE_WIDE);
mGoogleSignInButton.setOnClickListener(this);


}

@Override
Expand Down Expand Up @@ -119,7 +116,7 @@ public void onComplete(@NonNull Task<AuthResult> task) {
private void showDashboard() {
Intent intent = new Intent(LoginActivity.this, DashboardActivity.class);
startActivity(intent);

finish();
}


Expand Down
17 changes: 17 additions & 0 deletions app/src/main/java/com/example/android/audacity/SplashActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.example.android.audacity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class SplashActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startActivity(new Intent(SplashActivity.this, LoginActivity.class));
// close splash activity
finish();

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package com.example.android.audacity.adapters;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.android.audacity.R;
import com.example.android.audacity.pojo.Challenge;
import com.example.android.audacity.utilities.Helpers;

import java.util.ArrayList;

public class ChallengesAdapter extends RecyclerView.Adapter<ChallengesAdapter.ViewHolder> {

private ArrayList<Challenge> mChallengeData;
private Context mContext;

public ChallengesAdapter(ArrayList<Challenge> mChallengeData, Context mContext) {
this.mChallengeData = mChallengeData;
this.mContext = mContext;
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View rootView = LayoutInflater.from(mContext).inflate(R.layout.item_challenge, parent, false);
return new ViewHolder(rootView);
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
Challenge challenge = mChallengeData.get(position);

String title = challenge.getChallengeName();
String moderatorName = challenge.getModeratorName();
String endDate = challenge.getEndDate();
String profileImage = challenge.getProfileImage();

holder.challengeName.setText(title);
holder.moderatorName.setText(moderatorName);
holder.endDate.setText(Helpers.formatDate(endDate));
Glide.with(mContext).load(profileImage).into(holder.profileImage);
}

@Override
public int getItemCount() {
return mChallengeData.size();
}

public class ViewHolder extends RecyclerView.ViewHolder {
private TextView challengeName;
private TextView moderatorName;
private TextView startDate;
private TextView endDate;
private ImageView profileImage;
private Button detailViewButton;

public ViewHolder(View itemView) {
super(itemView);
challengeName = itemView.findViewById(R.id.challenge_title);
moderatorName = itemView.findViewById(R.id.challenge_moderator_name);
endDate = itemView.findViewById(R.id.challenge_date);
profileImage = itemView.findViewById(R.id.challenge_profile_image);

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package com.example.android.audacity.adapters;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.android.audacity.R;
import com.example.android.audacity.pojo.HottestApp;
import com.example.android.audacity.utilities.Helpers;

import java.util.ArrayList;

public class HottestAppAdapter extends RecyclerView.Adapter<HottestAppAdapter.ViewHolder> {

private ArrayList<HottestApp> mHottestAppData;
private Context mContext;

public HottestAppAdapter(ArrayList<HottestApp> hottestAppData, Context context) {
this.mHottestAppData = hottestAppData;
this.mContext = context;
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View rootView = LayoutInflater.from(mContext).inflate(R.layout.item_hottest_app,parent , false);
return new ViewHolder(rootView);
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
HottestApp hottestApp = mHottestAppData.get(position);

String title = hottestApp.getAppTitle();
String studentName =hottestApp.getStudentName();
String postedOn = hottestApp.getPostedDate();
String profileImage = hottestApp.getProfileImage();

holder.appTitle.setText(title);
holder.studentName.setText(studentName);
holder.postedOn.setText(Helpers.formatDate(postedOn));
Glide.with(mContext).load(profileImage).into(holder.profileImage);
}

@Override
public int getItemCount() {
return mHottestAppData.size();
}

public class ViewHolder extends RecyclerView.ViewHolder {
private TextView appTitle;
private TextView studentName;
private TextView postedOn;
private ImageView profileImage;
private Button detailViewButton;

public ViewHolder(View itemView) {
super(itemView);
appTitle = itemView.findViewById(R.id.hottest_app_title);
studentName = itemView.findViewById(R.id.hottest_app_student_name);
postedOn = itemView.findViewById(R.id.hottest_app_date);
profileImage = itemView.findViewById(R.id.hottest_app_profile_image);
detailViewButton = itemView.findViewById(R.id.hottest_app_detail_button);
}
}
}
Loading