9
9
import android .widget .RelativeLayout ;
10
10
import android .widget .TextView ;
11
11
12
- import com .daimajia .swipe .SwipeLayout ;
13
12
import com .google .android .material .animation .ArgbEvaluatorCompat ;
14
13
import com .pedrogomez .renderers .Renderer ;
15
14
@@ -32,12 +31,8 @@ public class NotificationRenderer extends Renderer<Notification> {
32
31
TextView time ;
33
32
@ BindView (R .id .icon )
34
33
ImageView icon ;
35
- @ BindView (R .id .swipeLayout )
36
- SwipeLayout swipeLayout ;
37
- @ BindView (R .id .bottom )
38
- LinearLayout bottomLayout ;
39
- @ BindView (R .id .notification_view )
40
- RelativeLayout notificationView ;
34
+ /*@BindView(R.id.bottom)
35
+ LinearLayout bottomLayout;*/
41
36
42
37
private NotificationClicked listener ;
43
38
private boolean isarchivedvisible = false ;
@@ -53,13 +48,6 @@ void onNotificationClicked() {
53
48
listener .notificationClicked (getContent ());
54
49
}
55
50
56
- @ OnClick (R .id .bottom )
57
- void onBottomLayoutClicked (){
58
- Notification notification = getContent ();
59
- Timber .d ("NotificationID: %s" , notification .notificationId );
60
- listener .markNotificationAsRead (notification );
61
- }
62
-
63
51
@ Override
64
52
protected void setUpView (View rootView ) {
65
53
@@ -74,21 +62,6 @@ protected void hookListeners(View rootView) {
74
62
protected View inflate (LayoutInflater layoutInflater , ViewGroup viewGroup ) {
75
63
View inflatedView = layoutInflater .inflate (R .layout .item_notification , viewGroup , false );
76
64
ButterKnife .bind (this , inflatedView );
77
- if (isarchivedvisible ) {
78
- swipeLayout .setSwipeEnabled (false );
79
- }else {
80
- swipeLayout .setSwipeEnabled (true );
81
- }
82
- swipeLayout .addDrag (SwipeLayout .DragEdge .Top , bottomLayout );
83
- swipeLayout .addRevealListener (R .id .bottom_wrapper_child1 , (child , edge , fraction , distance ) -> {
84
- View star = child .findViewById (R .id .star );
85
- float d = child .getHeight () / 2 - star .getHeight () / 2 ;
86
- star .setTranslationY (d * fraction );
87
- star .setScaleX (fraction + 0.6f );
88
- star .setScaleY (fraction + 0.6f );
89
- int c = ArgbEvaluatorCompat .getInstance ().evaluate (fraction , Color .parseColor ("#dddddd" ), Color .parseColor ("#90960a0a" ));
90
- child .setBackgroundColor (c );
91
- });
92
65
return inflatedView ;
93
66
}
94
67
0 commit comments