Skip to content

Commit

Permalink
version 2.0.0-BETA-5
Browse files Browse the repository at this point in the history
- update support libs
- remove XML profile from profile chooser
  • Loading branch information
raphaelbussa committed Feb 5, 2017
1 parent 72d44c5 commit e02f53e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 28 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ buildscript {
buildTools: "25.0.2",
minSdk : 11,
targetSdk : 25,
version : "2.0.0-BETA-4",
supportLib: "25.1.0"
version : "2.0.0-BETA-5",
supportLib: "25.1.1"
]
}

Expand Down
29 changes: 16 additions & 13 deletions library/src/main/java/rebus/header/view/ProfileChooser.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,24 @@ public void onClick(View v) {
}
});
for (int i = 0; i < profileSparseArray.size(); i++) {
RowProfileView profileView = new RowProfileView(context);
profileView.setProfile(profileSparseArray.valueAt(i), i == 0);
profileView.setAccent(accent);
profileView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RowProfileView rowProfileView = (RowProfileView) v;
if (callback != null) {
if (callback.onSelect(rowProfileView.getProfile().getId(), rowProfileView.isActive())) {
dismiss();
Profile profile = profileSparseArray.valueAt(i);
if (profile.getId() != 1) {
RowProfileView profileView = new RowProfileView(context);
profileView.setProfile(profile, i == 0);
profileView.setAccent(accent);
profileView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RowProfileView rowProfileView = (RowProfileView) v;
if (callback != null) {
if (callback.onSelect(rowProfileView.getProfile().getId(), rowProfileView.isActive())) {
dismiss();
}
}
}
}
});
linearLayout.addView(profileView);
});
linearLayout.addView(profileView);
}
}
int padding = context.getResources().getDimensionPixelSize(R.dimen.hv_item_padding);
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
Expand Down
29 changes: 16 additions & 13 deletions library/src/main/java/rebus/header/view/ProfileChooserFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,24 @@ public void onClick(View v) {
});
if (profileSparseArray != null) {
for (int i = 0; i < profileSparseArray.size(); i++) {
RowProfileView profileView = new RowProfileView(getActivity());
profileView.setProfile(profileSparseArray.valueAt(i), i == 0);
profileView.setAccent(accent);
profileView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RowProfileView rowProfileView = (RowProfileView) v;
if (callback != null) {
if (callback.onSelect(rowProfileView.getProfile().getId(), rowProfileView.isActive())) {
dismiss();
Profile profile = profileSparseArray.valueAt(i);
if (profile.getId() != 1) {
RowProfileView profileView = new RowProfileView(getActivity());
profileView.setProfile(profile, i == 0);
profileView.setAccent(accent);
profileView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RowProfileView rowProfileView = (RowProfileView) v;
if (callback != null) {
if (callback.onSelect(rowProfileView.getProfile().getId(), rowProfileView.isActive())) {
dismiss();
}
}
}
}
});
linearLayout.addView(profileView);
});
linearLayout.addView(profileView);
}
}
}
if (items != null) {
Expand Down

0 comments on commit e02f53e

Please sign in to comment.