Santosh Bhandary
3 years ago
24 changed files with 250 additions and 105 deletions
-
2app/src/main/java/com/swifttech/remit/jmecustomer/features/home/gateway/HomeV2Gateway.java
-
27app/src/main/java/com/swifttech/remit/jmecustomer/features/home/model/UserInfoModelV2.java
-
25app/src/main/java/com/swifttech/remit/jmecustomer/features/home/presenter/HomeNotificationHandler.java
-
3app/src/main/java/com/swifttech/remit/jmecustomer/features/home/presenter/HomeV2PresenterInterface.java
-
11app/src/main/java/com/swifttech/remit/jmecustomer/features/home/presenter/HomeViewModel.java
-
6app/src/main/java/com/swifttech/remit/jmecustomer/features/home/view/HomeActivityV2.java
-
7app/src/main/java/com/swifttech/remit/jmecustomer/features/home/view/HomeFragmentV2.java
-
69app/src/main/java/com/swifttech/remit/jmecustomer/features/home/view/notifications/ChangePassNotificationView.java
-
10app/src/main/java/com/swifttech/remit/jmecustomer/features/home/view/notifications/HomeNotificiationViewFactory.java
-
2app/src/main/java/com/swifttech/remit/jmecustomer/features/notice/adapter/NoticeListingRVAdapter.java
-
4app/src/main/java/com/swifttech/remit/jmecustomer/features/notice/gateway/NoticeGateway.java
-
2app/src/main/java/com/swifttech/remit/jmecustomer/features/notice/view/NoticeListingFragment.java
-
2app/src/main/java/com/swifttech/remit/jmecustomer/features/userprofile/view/ProfileActivity.java
-
2app/src/main/java/com/swifttech/remit/jmecustomer/utils/https/API_URL.java
-
5app/src/main/java/com/swifttech/remit/jmecustomer/utils/https/ApiEndpoints.java
-
6app/src/main/res/drawable/ic_read.xml
-
2app/src/main/res/layout/activity_settings.xml
-
5app/src/main/res/layout/fragment_existing_customer_registration_submit.xml
-
154app/src/main/res/layout/notice_list_viewholder_v3.xml
-
2app/src/main/res/values-bn/strings.xml
-
2app/src/main/res/values-ja/strings.xml
-
2app/src/main/res/values-ne/strings.xml
-
2app/src/main/res/values-vi/strings.xml
-
3app/src/main/res/values/strings.xml
@ -0,0 +1,69 @@ |
|||||
|
package com.swifttech.remit.jmecustomer.features.home.view.notifications; |
||||
|
|
||||
|
import android.animation.ObjectAnimator; |
||||
|
import android.animation.ValueAnimator; |
||||
|
import android.content.Context; |
||||
|
import android.util.AttributeSet; |
||||
|
import android.view.LayoutInflater; |
||||
|
import android.view.View; |
||||
|
import android.widget.ImageView; |
||||
|
import android.widget.TextView; |
||||
|
|
||||
|
import com.swifttech.remit.jmecustomer.R; |
||||
|
|
||||
|
import butterknife.BindView; |
||||
|
import butterknife.ButterKnife; |
||||
|
|
||||
|
public class ChangePassNotificationView extends NotificaitonBaseView { |
||||
|
|
||||
|
@BindView(R.id.kftc_renew_title) |
||||
|
TextView kftc_renew_title; |
||||
|
|
||||
|
@BindView(R.id.kftc_renew_text) |
||||
|
TextView kftc_renew_text; |
||||
|
|
||||
|
@BindView(R.id.kftc_renew_image) |
||||
|
ImageView kftc_renew_image; |
||||
|
private ObjectAnimator anim; |
||||
|
|
||||
|
public ChangePassNotificationView(Context context) { |
||||
|
super(context); |
||||
|
init(context); |
||||
|
} |
||||
|
|
||||
|
public ChangePassNotificationView(Context context, AttributeSet attrs) { |
||||
|
super(context, attrs); |
||||
|
init(context); |
||||
|
} |
||||
|
|
||||
|
public ChangePassNotificationView(Context context, AttributeSet attrs, int defStyleAttr) { |
||||
|
super(context, attrs, defStyleAttr); |
||||
|
init(context); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void animateNotification() { |
||||
|
if(anim==null||!anim.isRunning()) { |
||||
|
anim = ObjectAnimator.ofFloat(kftc_renew_image, View.ROTATION, 0,15,-15,9,-9,0); |
||||
|
anim.setStartDelay(300); |
||||
|
anim.setDuration(2000).setRepeatMode(ValueAnimator.RESTART); |
||||
|
anim.setRepeatCount(ValueAnimator.INFINITE); |
||||
|
anim.start(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private void init(Context context) |
||||
|
{ |
||||
|
View view= LayoutInflater.from(context).inflate(R.layout.notification_auto_debit_required, this, true); |
||||
|
ButterKnife.bind(view,this); |
||||
|
} |
||||
|
|
||||
|
public void setTitle(String title) { |
||||
|
kftc_renew_title.setText(title); |
||||
|
} |
||||
|
|
||||
|
public void setMessage(String messageBody) { |
||||
|
kftc_renew_text.setText(messageBody); |
||||
|
|
||||
|
} |
||||
|
} |
@ -1,84 +1,98 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||
|
<com.google.android.material.card.MaterialCardView |
||||
|
xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
xmlns:tools="http://schemas.android.com/tools" |
||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||
android:padding="@dimen/_8sdp"> |
|
||||
|
android:outlineAmbientShadowColor="@color/dark_gray" |
||||
|
android:outlineSpotShadowColor="@color/dark_gray" |
||||
|
android:layout_margin="@dimen/_5sdp" |
||||
|
android:layout_marginRight="@dimen/_10sdp" |
||||
|
android:layout_marginLeft="@dimen/_10sdp" |
||||
|
> |
||||
|
<androidx.constraintlayout.widget.ConstraintLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:padding="@dimen/_5sdp" |
||||
|
android:paddingLeft="@dimen/_8sdp" |
||||
|
android:paddingRight="@dimen/_8sdp" |
||||
|
> |
||||
|
<com.swifttech.remit.jmecustomer.common.customwidgets.JmeTextView |
||||
|
android:layout_marginTop="@dimen/_5sdp" |
||||
|
android:id="@+id/tv_notification_title" |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:ellipsize="end" |
||||
|
android:gravity="start" |
||||
|
android:maxLines="1" |
||||
|
android:textColor="@color/darkgray" |
||||
|
android:textSize="@dimen/_13sdp" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toTopOf="parent" |
||||
|
app:layout_constraintEnd_toStartOf="@id/tv_status" |
||||
|
app:txtfontName="@string/bold" |
||||
|
tools:text="When developed " /> |
||||
|
|
||||
|
<com.swifttech.remit.jmecustomer.common.customwidgets.JmeTextView |
||||
|
android:layout_marginEnd="@dimen/_15sdp" |
||||
|
android:id="@+id/tv_status" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="start" |
||||
|
android:textColor="@color/blue" |
||||
|
android:paddingStart="@dimen/_6sdp" |
||||
|
android:paddingEnd="@dimen/_6sdp" |
||||
|
android:paddingTop="@dimen/_1sdp" |
||||
|
android:paddingBottom="@dimen/_1sdp" |
||||
|
android:visibility="gone" |
||||
|
android:textSize="@dimen/_10ssp" |
||||
|
app:layout_constraintStart_toEndOf="@+id/tv_notification_title" |
||||
|
app:layout_constraintTop_toTopOf="@id/tv_notification_title" |
||||
|
app:layout_constraintEnd_toStartOf="@id/rightArrow" |
||||
|
android:background="@drawable/ic_rounded_country_listing_pink" |
||||
|
android:text="@string/new_text" /> |
||||
|
|
||||
<com.swifttech.remit.jmecustomer.common.customwidgets.JmeTextView |
|
||||
android:layout_marginTop="@dimen/_5sdp" |
|
||||
android:id="@+id/tv_notification_title" |
|
||||
android:layout_width="0dp" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:ellipsize="end" |
|
||||
android:gravity="start" |
|
||||
android:maxLines="1" |
|
||||
android:textColor="@color/darkgray" |
|
||||
android:textSize="@dimen/_13ssp" |
|
||||
app:layout_constraintStart_toStartOf="parent" |
|
||||
app:layout_constraintTop_toTopOf="parent" |
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_status" |
|
||||
app:txtfontName="@string/bold" |
|
||||
tools:text="When developed " /> |
|
||||
|
<com.swifttech.remit.jmecustomer.common.customwidgets.JmeTextView |
||||
|
android:id="@+id/tv_notification_date" |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:gravity="start" |
||||
|
android:textColor="@color/darkgray2" |
||||
|
android:textSize="@dimen/_10ssp" |
||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||
|
app:layout_constraintEnd_toEndOf="@+id/rightArrow" |
||||
|
app:layout_constraintStart_toStartOf="@+id/tv_notification_title" |
||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_notification_title" |
||||
|
android:layout_marginTop="@dimen/_4sdp" |
||||
|
android:layout_marginBottom="@dimen/_5sdp" |
||||
|
app:txtfontName="@string/regular" |
||||
|
app:layout_constraintEnd_toStartOf="@id/tv_status" |
||||
|
tools:text="@string/date_text" /> |
||||
|
|
||||
<com.swifttech.remit.jmecustomer.common.customwidgets.JmeTextView |
|
||||
android:layout_marginEnd="@dimen/_15sdp" |
|
||||
android:id="@+id/tv_status" |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:layout_gravity="start" |
|
||||
android:textColor="@color/blue" |
|
||||
android:paddingStart="@dimen/_6sdp" |
|
||||
android:paddingEnd="@dimen/_6sdp" |
|
||||
android:paddingTop="@dimen/_1sdp" |
|
||||
android:paddingBottom="@dimen/_1sdp" |
|
||||
android:visibility="gone" |
|
||||
android:textSize="@dimen/_10ssp" |
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_notification_title" |
|
||||
app:layout_constraintTop_toTopOf="@id/tv_notification_title" |
|
||||
app:layout_constraintEnd_toStartOf="@id/rightArrow" |
|
||||
android:background="@drawable/ic_rounded_country_listing_pink" |
|
||||
android:text="@string/new_text" /> |
|
||||
|
<ImageView |
||||
|
android:id="@+id/rightArrow" |
||||
|
android:layout_width="@dimen/_16sdp" |
||||
|
android:layout_height="@dimen/_18sdp" |
||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintTop_toTopOf="parent" |
||||
|
app:srcCompat="@drawable/right_arrow" /> |
||||
|
|
||||
<com.swifttech.remit.jmecustomer.common.customwidgets.JmeTextView |
|
||||
android:id="@+id/tv_notification_date" |
|
||||
android:layout_width="0dp" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:gravity="start" |
|
||||
android:textColor="@color/darkgray2" |
|
||||
android:textSize="@dimen/_10ssp" |
|
||||
app:layout_constraintBottom_toBottomOf="parent" |
|
||||
app:layout_constraintEnd_toEndOf="@+id/rightArrow" |
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_notification_title" |
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_notification_title" |
|
||||
android:layout_marginTop="@dimen/_4sdp" |
|
||||
android:layout_marginBottom="@dimen/_5sdp" |
|
||||
app:txtfontName="@string/regular" |
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_status" |
|
||||
tools:text="@string/date_text" /> |
|
||||
|
<ImageView |
||||
|
android:id="@+id/imgNotificationStat" |
||||
|
android:layout_width="@dimen/_16sdp" |
||||
|
android:layout_height="@dimen/_18sdp" |
||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||
|
app:layout_constraintEnd_toStartOf="@+id/tv_notification_title" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toTopOf="parent" |
||||
|
android:layout_marginRight="@dimen/commonMargin" |
||||
|
/> |
||||
|
|
||||
<ImageView |
|
||||
android:id="@+id/rightArrow" |
|
||||
android:layout_width="@dimen/_16sdp" |
|
||||
android:layout_height="@dimen/_18sdp" |
|
||||
app:layout_constraintBottom_toBottomOf="parent" |
|
||||
app:layout_constraintEnd_toEndOf="parent" |
|
||||
app:layout_constraintTop_toTopOf="parent" |
|
||||
app:srcCompat="@drawable/right_arrow" /> |
|
||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
|
|
||||
<ImageView |
|
||||
android:id="@+id/imgNotificationStat" |
|
||||
android:layout_width="@dimen/_16sdp" |
|
||||
android:layout_height="@dimen/_18sdp" |
|
||||
app:layout_constraintBottom_toBottomOf="parent" |
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_notification_title" |
|
||||
app:layout_constraintStart_toStartOf="parent" |
|
||||
app:layout_constraintTop_toTopOf="parent" |
|
||||
android:layout_marginRight="@dimen/commonMargin" |
|
||||
/> |
|
||||
|
</com.google.android.material.card.MaterialCardView> |
||||
|
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
|
||||
|
|
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue