hide coupon codes if empty
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -10,6 +10,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.afollestad.materialdialogs.DialogAction;
|
import com.afollestad.materialdialogs.DialogAction;
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
@@ -62,6 +63,7 @@ public class ProfileFragment extends BaseFragment {
|
|||||||
@BindView(R.id.emailPizzalinkInfoLayout) AppInfoView emailPizzalinkInfoLayout;
|
@BindView(R.id.emailPizzalinkInfoLayout) AppInfoView emailPizzalinkInfoLayout;
|
||||||
@BindView(R.id.phonePizzalinkInfoLayout) AppInfoView phonePizzalinkInfoLayout;
|
@BindView(R.id.phonePizzalinkInfoLayout) AppInfoView phonePizzalinkInfoLayout;
|
||||||
@BindView(R.id.enableNotificationsSwitch) SwitchCompat enableNotificationsSwitch;
|
@BindView(R.id.enableNotificationsSwitch) SwitchCompat enableNotificationsSwitch;
|
||||||
|
@BindView(R.id.personalCouponCodesTextView) TextView personalCouponCodesTextView;
|
||||||
@BindView(R.id.personalCouponCodesRecyclerView) RecyclerView personalCouponCodesRecyclerView;
|
@BindView(R.id.personalCouponCodesRecyclerView) RecyclerView personalCouponCodesRecyclerView;
|
||||||
|
|
||||||
@BindString(R.string.bottom_nav_menu_item_profile) String fragmentTitle;
|
@BindString(R.string.bottom_nav_menu_item_profile) String fragmentTitle;
|
||||||
@@ -297,6 +299,13 @@ public class ProfileFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initPersonalCouponCodesRecyclerView(ArrayList<PersonalCouponModel> personalCouponList){
|
private void initPersonalCouponCodesRecyclerView(ArrayList<PersonalCouponModel> personalCouponList){
|
||||||
|
if(personalCouponList == null || personalCouponList.isEmpty()){
|
||||||
|
personalCouponCodesTextView.setVisibility(View.GONE);
|
||||||
|
personalCouponCodesRecyclerView.setVisibility(View.GONE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
personalCouponCodesTextView.setVisibility(View.VISIBLE);
|
||||||
|
personalCouponCodesRecyclerView.setVisibility(View.VISIBLE);
|
||||||
personalCouponCodesRecyclerAdapter = new PersonalCouponCodesRecyclerAdapter(BaseActivity.currentActivity, personalCouponList);
|
personalCouponCodesRecyclerAdapter = new PersonalCouponCodesRecyclerAdapter(BaseActivity.currentActivity, personalCouponList);
|
||||||
personalCouponCodesRecyclerView.setLayoutManager(new LinearLayoutManager(BaseActivity.currentActivity));
|
personalCouponCodesRecyclerView.setLayoutManager(new LinearLayoutManager(BaseActivity.currentActivity));
|
||||||
personalCouponCodesRecyclerView.setNestedScrollingEnabled(false);
|
personalCouponCodesRecyclerView.setNestedScrollingEnabled(false);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
app:description="@string/kebap_pass" />
|
app:description="@string/kebap_pass" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/personalCouponCodesTextView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
|
|||||||
Reference in New Issue
Block a user