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

Develop #83

Merged
merged 60 commits into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5c019fb
fix: [ #27 ] Current location will be set when app starts
CloudyPadmal Mar 30, 2017
64286b2
Merge pull request #29 from CloudyPadmal/currentLocation
Dilu9218 Apr 12, 2017
4473920
Added the switch activity switching between private and public reposi…
icancode23 Jun 19, 2017
81f2eed
resolving conflicts
icancode23 Jun 19, 2017
3a78807
Merge branch 'master' into develop
icancode23 Jun 19, 2017
26b85ae
ignore google services
icancode23 Jun 19, 2017
eb9d22b
added the original google services json
icancode23 Jun 19, 2017
f125c79
Minor change Switch activity for public and private vehicles ready
icancode23 Jun 19, 2017
4639492
Added the HomeBaseScreen
icancode23 Jun 19, 2017
5f86b14
Facebook profile extracted person registered as a user in firebase db
icancode23 Jun 23, 2017
ae64dfa
Merge pull request #70 from KuteGSOC/HomeBaseScreen
NickHub4017 Jun 23, 2017
af7dd27
Added Feature for Friend Profile Viewing also improved fragment flow…
icancode23 Jun 25, 2017
db1049a
Replaced google services json and removed my own keys
icancode23 Jun 25, 2017
e3dd479
Code Refactor to remove unnecessary spaces between brackets and unne…
icancode23 Jun 26, 2017
2c30d1d
Replaced google services json and removed my own keys
icancode23 Jun 26, 2017
6d18f95
Merge pull request #71 from KuteGSOC/ConnectViewFriends
NickHub4017 Jun 30, 2017
ab5d123
Some Changes
icancode23 Jul 3, 2017
cc50fe7
Added the feature for custom profile Image
icancode23 Jul 3, 2017
377c596
Changed the layout a bit
icancode23 Jul 3, 2017
b4fa3f9
minor change
icancode23 Jul 5, 2017
44e7266
check
icancode23 Jul 5, 2017
e3df3b7
minor change
icancode23 Jul 5, 2017
a4eb9bd
minor change
icancode23 Jul 5, 2017
d610803
Completed profile edit without integrating edit profile image
icancode23 Jul 6, 2017
14af78b
Merge pull request #72 from KuteGSOC/ProfilePictureEdit
NickHub4017 Jul 7, 2017
35af0b9
midway
icancode23 Jul 7, 2017
f5ed115
Replaced google services and removed self ids from strings
icancode23 Jul 7, 2017
2c303cd
few changes
icancode23 Jul 7, 2017
31bd401
dialog layouts done
icancode23 Jul 7, 2017
fffefde
Deleted some test data sent to git by mistake
icancode23 Jul 7, 2017
4418eac
Complete But not tested
icancode23 Jul 9, 2017
bd86bf1
Dynamic loading of friends using a pull to load recycler view
icancode23 Jul 11, 2017
b4d654e
minor change
icancode23 Jul 12, 2017
11b210e
Merge pull request #73 from KuteGSOC/UserSelfProfileFilling
NickHub4017 Jul 14, 2017
60dff52
small fix
icancode23 Jul 17, 2017
4139a2c
Support for base64 in recycler
icancode23 Jul 21, 2017
9ac333c
replaced google services json
icancode23 Jul 22, 2017
6f7bb5e
fix
icancode23 Jul 22, 2017
7d9e9f8
fix
icancode23 Jul 22, 2017
ef597b2
fix
icancode23 Jul 22, 2017
742ab5c
fix
icancode23 Jul 22, 2017
a73774b
Merge pull request #75 from KuteGSOC/WorkflowFix
NickHub4017 Jul 22, 2017
45a03f5
added routes backend
icancode23 Aug 3, 2017
c75a11d
added routes backend
icancode23 Aug 3, 2017
c65ff11
Merge pull request #76 from KuteGSOC/routesBackend
NickHub4017 Aug 4, 2017
ba5d489
check
icancode23 Aug 13, 2017
f7c04e6
Majorly Complete
icancode23 Aug 21, 2017
64d2e67
Majorly Complete
icancode23 Aug 21, 2017
061a655
Added backend project
icancode23 Aug 21, 2017
b94523a
Added backend project
icancode23 Aug 21, 2017
f0a44f6
Added backend project
icancode23 Aug 21, 2017
e8360b0
Added Send Notification end point on server
icancode23 Aug 22, 2017
7e687e7
Added Send Notification end point on server
icancode23 Aug 22, 2017
67fed75
Merge pull request #77 from KuteGSOC/TripUI
NickHub4017 Aug 23, 2017
dec96c8
Beta Done and completed
icancode23 Aug 26, 2017
b68a026
Beta Done and completed
icancode23 Aug 26, 2017
512d728
Beta Backend
icancode23 Aug 26, 2017
07cd0a8
Beta Backend
icancode23 Aug 26, 2017
ddf5023
Merge pull request #78 from KuteGSOC/BetaComplete
NickHub4017 Aug 26, 2017
b123d3e
Merge branch 'master' into develop
NickHub4017 Nov 30, 2017
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
Prev Previous commit
Next Next commit
midway
  • Loading branch information
icancode23 committed Jul 7, 2017
commit 35af0b9dbe3b170456bae69b08bce33250b619c7
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package com.scorelab.kute.kute.PrivateVehicles.App.Activities;

import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.scorelab.kute.kute.R;


public class InitialDetailDialogs extends AppCompatActivity implements View.OnClickListener {
TextView[]dots;
LinearLayout dotsLayout;
Button proceed,back;
int current_frag;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.details_dialog_activity);
dotsLayout = (LinearLayout) findViewById(R.id.layoutDots);
proceed = (Button) findViewById(R.id.btn_proceed1);
back = (Button) findViewById(R.id.btn_back);
proceed.setOnClickListener(this);
back.setOnClickListener(this);
back.setVisibility(View.INVISIBLE);
addBottomDots(0);
}
private void addBottomDots(int currentPage) {
dots = new TextView[3];

int colorsActive = ResourcesCompat.getColor(getResources(), R.color.dot_active, null);
int colorsInactive = ResourcesCompat.getColor(getResources(), R.color.dot_inactive, null);

dotsLayout.removeAllViews();
for (int i = 0; i < dots.length; i++) {
dots[i] = new TextView(this);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { // a certain method is not valid for versions below adroid nougat
dots[i].setText(Html.fromHtml("&#8226;", Html.FROM_HTML_MODE_COMPACT));
}
else
{
dots[i].setText(Html.fromHtml("&#8226;"));
}
dots[i].setTextSize(35);
dots[i].setTextColor(colorsInactive);
dotsLayout.addView(dots[i]);
}

if (dots.length > 0)
dots[currentPage].setTextColor(colorsActive);
}

@Override
public void onClick(View v) {

switch (v.getId()) {
case R.id.btn_proceed1:
handleFragmentNavigation();
break;
case R.id.btn_back:
handleFragmentNavigation();
break;

}
}
/************************ Custom Functions **********************************/
private void handleFragmentNavigation()
{
//Handle the fragment navigation
switch(current_frag)
{

}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.Home) {
// Handle the camera action
getSupportFragmentManager().beginTransaction().replace(R.id.frameDrawer, new HomeBaseFragment(), "HomeBaseFragment").commit();
} else if (id == R.id.Profile) {
setupProfileFragment();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public class ProfilePictureActivity extends AppCompatActivity implements View.On
CoordinatorLayout cl;
String yourBase64String;
String TAG ="ProfilePictureActivity";
Boolean did_profile_image_change=false;
final int PROFILE_PICTURE_ACTIVITY_CODE=01;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -92,9 +94,16 @@ public void onClick(View v) {
break;
case R.id.update:
String base_64=convertToBase64(current_image);
did_profile_image_change=true;
saveNewImageToDb(base_64);
break;
case R.id.backNav:
Intent i=new Intent();
i.putExtra("DidProfileChange",did_profile_image_change);
if(did_profile_image_change) {
i.putExtra("ImageBase64String",yourBase64String);
}
setResult(PROFILE_PICTURE_ACTIVITY_CODE,i);
finish();
break;
}
Expand Down Expand Up @@ -309,15 +318,15 @@ private void base64ToBitmap(String base64)
}
private void saveNewImageToDb(String base_64)
{
DatabaseReference db_ref= FirebaseDatabase.getInstance().getReference("Users").child(pref.getString("Id","null"));
db_ref.setValue(new Person(pref.getString("Name","null"),pref.getString("Id","null"),base_64)).addOnFailureListener(new OnFailureListener() {
DatabaseReference db_ref= FirebaseDatabase.getInstance().getReference("Users").child(pref.getString("Id","null")).child("img_base64");
db_ref.setValue(base_64).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.d(TAG,"Update profile Image Firebase:"+e.toString());
}
});
//Change the Shared Preference Value
pref.edit().putString("Profile_Image",base_64).commit();
pref.edit().putString("Profile_Image",base_64).apply();
Log.d(TAG,"Update Profile Image:Done");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class Person implements Serializable {
/***************** Defing Properties ***********/
//Add provision for vehicle
//Make these variables private
public String id,name,img_url,occupation,other_details,contact_phone,vehicle;
public String id,name,img_base64,occupation,other_details,contact_phone,vehicle;
//Implement in some other way public Boolean is_friend; // This will indicate whether the given person is users friend
public ArrayList<Route> route_list;
/*********** Properties Defined *******/
Expand All @@ -21,10 +21,10 @@ public Person() {
/****************** This constructor will configure for the list item
****************** rest detail will be filled later when person detail activity is called *******/

public Person(String name,String id,String img_url) //Add id and img_url(Not being added right now because we dont have the backend for now)
public Person(String name,String id,String img_base64) //Add id and img_url(Not being added right now because we dont have the backend for now)
{
this.name=name;
this.img_url=img_url;
this.img_base64=img_base64;
this.id=id;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public class HomeBaseFragment extends Fragment {
View v;
BottomNavigationView bottomNavigation;
FragmentManager fm;
HomeTab ht;
FriendTab ft;
MyRoutesTab mrt;
HomeTab home_tab;
FriendTab friend_tab;
MyRoutesTab my_routes_tab;
ArrayList<Person> friend_list;
SharedPreferences.OnSharedPreferenceChangeListener pref_change_listener;
SharedPreferences prefs;
Expand All @@ -58,9 +58,9 @@ public class HomeBaseFragment extends Fragment {
/***************************** Default Constructor ****************/
public HomeBaseFragment() {
Log.d(TAG, "Constructor");
ht = new HomeTab();
ft = new FriendTab();
mrt = new MyRoutesTab();
home_tab = new HomeTab();
friend_tab = new FriendTab();
my_routes_tab = new MyRoutesTab();
}

/***************************** Overrides ****************************/
Expand Down Expand Up @@ -98,11 +98,11 @@ public void onReceive(Context context, Intent intent) {
//set initial fragments We have loaded all the three fragments simultaneously
// inorder to smooth out the transition between the three fragments
FragmentTransaction frag_transaction = fm.beginTransaction();
frag_transaction.add(R.id.frameBottomBar, ht, "HomeTab");
frag_transaction.add(R.id.frameBottomBar, ft, "FriendTab");
frag_transaction.add(R.id.frameBottomBar, mrt, "MyRoutesTab");
frag_transaction.hide(ft);
frag_transaction.hide(mrt);
frag_transaction.add(R.id.frameBottomBar, home_tab, "HomeTab");
frag_transaction.add(R.id.frameBottomBar, friend_tab, "FriendTab");
frag_transaction.add(R.id.frameBottomBar, my_routes_tab, "MyRoutesTab");
frag_transaction.hide(friend_tab);
frag_transaction.hide(my_routes_tab);
frag_transaction.commit();
bottomNavigation.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
Expand Down Expand Up @@ -204,52 +204,52 @@ private void sendMessageFriendTab(String Message,ArrayList<Person>friend_list1)
/************************ FUnctions to toggle fragment visibility ***************/
private void showHomeTab() {
FragmentTransaction fragmentTransaction = fm.beginTransaction();
if (ht.isAdded()) {
fragmentTransaction.show(ht);
if (home_tab.isAdded()) {
fragmentTransaction.show(home_tab);
Log.d(TAG, "Fragment transaction: HomeTab -> Found Previous One");
} else {
fragmentTransaction.add(R.id.frameBottomBar, ht, "HomeTab");
fragmentTransaction.add(R.id.frameBottomBar, home_tab, "HomeTab");
}
//Hide The other two fragments
if (ft.isAdded()) {
fragmentTransaction.hide(ft);
if (friend_tab.isAdded()) {
fragmentTransaction.hide(friend_tab);
}
if (mrt.isAdded()) {
fragmentTransaction.hide(mrt);
if (my_routes_tab.isAdded()) {
fragmentTransaction.hide(my_routes_tab);
}
fragmentTransaction.commit();
}

private void showFriendTab() {
FragmentTransaction fragmentTransaction = fm.beginTransaction();
if (ft.isAdded()) {
fragmentTransaction.show(ft);
if (friend_tab.isAdded()) {
fragmentTransaction.show(friend_tab);
} else {
fragmentTransaction.add(R.id.frameBottomBar, ft, "FriendTab");
fragmentTransaction.add(R.id.frameBottomBar, friend_tab, "FriendTab");
}
//Hide The other two fragments
if (ft.isAdded()) {
fragmentTransaction.hide(ht);
if (friend_tab.isAdded()) {
fragmentTransaction.hide(home_tab);
}
if (mrt.isAdded()) {
fragmentTransaction.hide(mrt);
if (my_routes_tab.isAdded()) {
fragmentTransaction.hide(my_routes_tab);
}
fragmentTransaction.commit();
}

private void showMyRoutesTab() {
FragmentTransaction fragmentTransaction = fm.beginTransaction();
if (mrt.isAdded()) {
fragmentTransaction.show(mrt);
if (my_routes_tab.isAdded()) {
fragmentTransaction.show(my_routes_tab);
} else {
fragmentTransaction.add(R.id.frameBottomBar, mrt, "MyRoutesTab");
fragmentTransaction.add(R.id.frameBottomBar, my_routes_tab, "MyRoutesTab");
}
//Hide The other two fragments
if (ft.isAdded()) {
fragmentTransaction.hide(ft);
if (friend_tab.isAdded()) {
fragmentTransaction.hide(friend_tab);
}
if (mrt.isAdded()) {
fragmentTransaction.hide(ht);
if (my_routes_tab.isAdded()) {
fragmentTransaction.hide(home_tab);
}
fragmentTransaction.commit();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.scorelab.kute.kute.PrivateVehicles.App.Fragments.InitialDetailDialogFragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.scorelab.kute.kute.R;

/**
* Created by nipunarora on 07/07/17.
*/

public class FirstInfoFragment extends Fragment {
View v;

public FirstInfoFragment() {
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
v=inflater.inflate(R.layout.starting_detail_dialog_fragment,container,false);
return v;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.scorelab.kute.kute.PrivateVehicles.App.Fragments.InitialDetailDialogFragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
* Created by nipunarora on 07/07/17.
*/

public class SecondConatctFragment extends Fragment {
View v;

public SecondConatctFragment() {
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return super.onCreateView(inflater, container, savedInstanceState);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.scorelab.kute.kute.PrivateVehicles.App.Fragments.InitialDetailDialogFragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
* Created by nipunarora on 07/07/17.
*/

public class ThirdVehicleFragment extends Fragment {
View v;

public ThirdVehicleFragment() {
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return super.onCreateView(inflater, container, savedInstanceState);
}
}
Loading