Skip to content

Commit

Permalink
Merge pull request nickbutcher#114 from amilcar-andrade/butter-knife-…
Browse files Browse the repository at this point in the history
…dribbble-login

Use ButterKnife for DribbbleLogin Activity
  • Loading branch information
nickbutcher authored Sep 22, 2016
2 parents e798e63 + 6c19d81 commit 3b10c99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/io/plaidapp/ui/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ private void bindLibrary(final LibraryHolder holder, final Library lib) {
holder.name.setText(lib.name);
Glide.with(holder.image.getContext())
.load(lib.imageUrl)
.placeholder(R.drawable.avatar_placeholder)
.transform(circleCrop)
.into(holder.image);
final View.OnClickListener clickListener = new View.OnClickListener() {
Expand Down
19 changes: 8 additions & 11 deletions app/src/main/java/io/plaidapp/ui/DribbbleLogin.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import io.plaidapp.BuildConfig;
import io.plaidapp.R;
import io.plaidapp.data.api.dribbble.DribbbleAuthService;
Expand All @@ -65,23 +67,18 @@ public class DribbbleLogin extends Activity {

boolean isDismissing = false;
boolean isLoginFailed = false;
private ViewGroup container;
private TextView message;
private Button login;
private ProgressBar loading;
@BindView(R.id.container) ViewGroup container;
@BindView(R.id.login_message) TextView message;
@BindView(R.id.login) Button login;
@BindView(R.id.loading) ProgressBar loading;
@BindView(R.id.login_failed_message) TextView loginFailed;
private DribbblePrefs dribbblePrefs;
private TextView loginFailed;

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

container = (ViewGroup) findViewById(R.id.container);
message = (TextView) findViewById(R.id.login_message);
login = (Button) findViewById(R.id.login);
loading = (ProgressBar) findViewById(R.id.loading);
loginFailed = (TextView) container.findViewById(R.id.login_failed_message);
ButterKnife.bind(this);
loading.setVisibility(View.GONE);
dribbblePrefs = DribbblePrefs.get(this);

Expand Down

0 comments on commit 3b10c99

Please sign in to comment.