Skip to content
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
44 changes: 0 additions & 44 deletions EverPay/app/<?php

This file was deleted.

2 changes: 2 additions & 0 deletions EverPay/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<orderEntry type="library" exported="" name="play-services-plus-7.3.0" level="project" />
<orderEntry type="library" exported="" name="circleimageview-1.2.1" level="project" />
<orderEntry type="library" exported="" name="AppRate_1.1" level="project" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="play-services-base-7.3.0" level="project" />
<orderEntry type="library" exported="" name="play-services-panorama-7.3.0" level="project" />
<orderEntry type="library" exported="" name="play-services-appindexing-7.3.0" level="project" />
Expand All @@ -144,5 +145,6 @@
<orderEntry type="library" exported="" name="play-services-nearby-7.3.0" level="project" />
<orderEntry type="library" exported="" name="play-services-7.3.0" level="project" />
<orderEntry type="module" module-name="vksdk_library" exported="" />
<orderEntry type="module" module-name="showcaseview" exported="" />
</component>
</module>
13 changes: 13 additions & 0 deletions EverPay/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,22 @@ dependencies {
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile 'com.squareup.picasso:picasso:2.3.2'
compile project(':vksdk_library')
compile project (':showcaseview')
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile 'com.google.android.gms:play-services:7.3.0'
compile files('src/libs/FlurryAnalytics-5.5.0.jar')
compile files('src/libs/AppRate_1.1.jar')
// repositories {
// mavenCentral()
// maven(){
// url "https://oss.sonatype.org/content/repositories/snapshots"
// }
// }
// compile ('com.github.worker8:tourguide:1.0.13-SNAPSHOT@aar'){
// transitive=true
// }
// compile 'com.github.amlcurran.showcaseview:library:5.0.0'
compile 'com.nineoldandroids:library:2.4.0'

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.widget.CursorAdapter;
import android.widget.SectionIndexer;
import android.widget.TextView;
import android.widget.Toast;

import com.beautyteam.everpay.Database.GroupMembers;
import com.beautyteam.everpay.Database.Users;
Expand Down Expand Up @@ -44,11 +45,15 @@ public AddFriendsToGroupAdapter(Context context, Cursor c, int flags,ArrayList <
}
int i = 0;
c.moveToFirst();
sections = "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
if(c.getInt(c.getColumnIndex(Users.USER_ID_VK)) == 0)
sections +="\u2606";
else
sections += "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
while(c.moveToNext()) {
if (c.getString(c.getColumnIndex(Users.NAME)).charAt(0) != sections.charAt(i)) {
sections += "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
i++;
if(c.getInt(c.getColumnIndex(Users.USER_ID_VK)) != 0)
if (c.getString(c.getColumnIndex(Users.NAME)).charAt(0) != sections.charAt(i)) {
sections += "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
i++;
}
}
}
Expand Down Expand Up @@ -97,24 +102,27 @@ public void bindView(View view, final Context context, final Cursor cursor) {
String name = cursor.getString(cursor.getColumnIndex(Users.NAME));
holder.firstName.setText(name);
final int id = cursor.getInt(cursor.getColumnIndex(Users.USER_ID));
int userVkId = cursor.getInt(cursor.getColumnIndex(Users.USER_ID_VK));
holder.separator.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
boolean isChecked = false;
if (set.contains(id)) {
isChecked = true;
}
holder.checkBox.setChecked(isChecked);

holder.separator.setPadding(0,0,0,0);
if(cursor.getPosition() != 0) {
cursor.moveToPrevious();
if (cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) != name.charAt(0)) {
if (userVkId == 0)
holder.separator.setText("");
else if ((cursor.getInt(cursor.getColumnIndex(Users.USER_ID_VK)) == 0)||(cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) != name.charAt(0)))
holder.separator.setText(name.subSequence(0, 1));
} else {
else
holder.separator.setText("");
holder.separator.setPadding(32,0,0,0);
}
cursor.moveToNext();
} else {
holder.separator.setText(name.subSequence(0, 1));
if(cursor.getInt(cursor.getColumnIndex(Users.USER_ID_VK)) == 0)
holder.separator.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_star_rate_blue_36dp, 0, 0, 0);
else
holder.separator.setText(name.subSequence(0, 1));
}

view.setOnClickListener(new View.OnClickListener() {
Expand Down Expand Up @@ -164,10 +172,13 @@ public Object[] getSections() {
public int getPositionForSection(int section) {
Cursor cursor = getCursor();
cursor.moveToPosition(-1);
while(cursor.moveToNext()) {
if (section == 0 ) {
return 0;
} else
while(cursor.moveToNext()) {
if (cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) == sections.charAt(section))
return cursor.getPosition();
}
}
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
import com.beautyteam.everpay.Database.Calculation;
import com.beautyteam.everpay.R;
import com.beautyteam.everpay.Views.RoundedImageView;
import com.github.amlcurran.showcaseview.OnShowcaseEventListener;
import com.github.amlcurran.showcaseview.ShowcaseView;
import com.github.amlcurran.showcaseview.targets.ViewTarget;
import com.squareup.picasso.Picasso;
import com.vk.sdk.api.VKApi;
import com.vk.sdk.api.VKApiConst;
Expand Down Expand Up @@ -44,7 +47,6 @@ public class CalcListAdapter extends CursorAdapter {
private HashMap<Integer, Boolean> mapPositionToIsOpenSecondAvatar = new HashMap<Integer, Boolean>();
private HashMap<String, String> mapIdToAvatar = new HashMap<String, String>();


private int userIdOwner; // ID пользователя, чтобы узнать, какая должна быть стрелочка

public CalcListAdapter(Context context, Cursor c, int flags) {
Expand Down Expand Up @@ -215,7 +217,6 @@ public void onClick(View view) {
closeAvatar(holder.secondLayout, holder.secondName);
mapPositionToIsOpenSecondAvatar.put(position, false);
}

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ public EditFriendsToGroupAdapter(Context context, Cursor c, int flags, MainActiv
this.friendsInGroup = fragmentEditFriends;
int i = 0;
c.moveToFirst();
sections = "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
if(c.getInt(c.getColumnIndex(Users.USER_ID_VK)) == 0)
sections +="\u2606";
else
sections += "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
while(c.moveToNext()) {
if (c.getString(c.getColumnIndex(Users.NAME)).charAt(0) != sections.charAt(i)) {
sections += "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
i++;
}
if(c.getInt(c.getColumnIndex(Users.USER_ID_VK)) != 0)
if (c.getString(c.getColumnIndex(Users.NAME)).charAt(0) != sections.charAt(i)) {
sections += "" + c.getString(c.getColumnIndex(Users.NAME)).charAt(0);
i++;
}
}
}

Expand All @@ -60,24 +64,27 @@ public void bindView(View view, final Context context, final Cursor cursor) {
final ViewHolder holder = (ViewHolder)view.getTag();
final int id = cursor.getInt(cursor.getColumnIndex(Users.USER_ID));
String name = cursor.getString(cursor.getColumnIndex(Users.NAME));
int userVkId = cursor.getInt(cursor.getColumnIndex(Users.USER_ID_VK));
holder.firstName.setText(name);
holder.separator.setPadding(0,0,0,0);
holder.separator.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
if(cursor.getPosition() != 0) {
cursor.moveToPrevious();
if (cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) != name.charAt(0)) {
if (userVkId == 0)
holder.separator.setText("");
else if ((cursor.getInt(cursor.getColumnIndex(Users.USER_ID_VK)) == 0)||(cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) != name.charAt(0)))
holder.separator.setText(name.subSequence(0, 1));
} else {
else
holder.separator.setText("");
holder.separator.setPadding(32,0,0,0);
}
cursor.moveToNext();
} else {
holder.separator.setText(name.subSequence(0, 1));
if(cursor.getInt(cursor.getColumnIndex(Users.USER_ID_VK)) == 0)
holder.separator.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_star_rate_blue_36dp, 0, 0, 0);
else
holder.separator.setText(name.subSequence(0, 1));
}
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//addMemberToGroup(id,groupId);
friendsInGroup.addMemberToGroup(id, groupId);
}
});
Expand Down Expand Up @@ -110,10 +117,13 @@ public Object[] getSections() {
public int getPositionForSection(int section) {
Cursor cursor = getCursor();
cursor.moveToPosition(-1);
while(cursor.moveToNext()) {
if (cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) == sections.charAt(section))
return cursor.getPosition();
}
if (section == 0 ) {
return 0;
} else
while(cursor.moveToNext()) {
if (cursor.getString(cursor.getColumnIndex(Users.NAME)).charAt(0) == sections.charAt(section))
return cursor.getPosition();
}
return 0;
}

Expand Down
Loading