Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 3d5a448

Browse files
committed
fix crash on lollipop
1 parent e31d76d commit 3d5a448

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.graphics.Color;
44
import android.os.Build;
5+
import android.support.v4.content.ContextCompat;
56
import android.support.v7.view.ActionMode;
67
import android.support.v7.widget.RecyclerView;
78
import android.view.LayoutInflater;
@@ -136,7 +137,7 @@ public boolean onLongClick(View v) {
136137
holder.type.setTextColor(Color.BLACK);
137138
} else {
138139
holder.itemView.setBackgroundResource(Color.alpha(1));
139-
holder.type.setTextColor(activity.getColor(R.color.grey_500));
140+
holder.type.setTextColor(ContextCompat.getColor(activity, R.color.grey_500));
140141
}
141142
}
142143

0 commit comments

Comments
 (0)