Search in sources :

Example 21 with BottomSheetDialog

use of com.google.android.material.bottomsheet.BottomSheetDialog in project android-client by GenesisVision.

the class ConfirmFundWithdrawBottomSheetFragment method setupDialog.

@SuppressLint("RestrictedApi")
@Override
public void setupDialog(Dialog dialog, int style) {
    super.setupDialog(dialog, style);
    getDialog().setOnShowListener(dialog1 -> {
        BottomSheetDialog d = (BottomSheetDialog) dialog1;
        View bottomSheetInternal = d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
        if (bottomSheetInternal != null) {
            BottomSheetBehavior.from(bottomSheetInternal).setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    });
    View contentView = View.inflate(getContext(), R.layout.fragment_bottomsheet_confirm_fund_withdraw, null);
    dialog.setContentView(contentView);
    ButterKnife.bind(this, contentView);
    GenesisVisionApplication.getComponent().inject(this);
    setFonts();
    fundLogo.setLevelBackground(R.attr.colorTextPrimary);
    cancelButton.setEmpty();
    cancelButton.setTextColorByAttrId(R.attr.colorCard);
    updateView();
}
Also used : BottomSheetDialog(com.google.android.material.bottomsheet.BottomSheetDialog) ProgramLogoView(vision.genesis.clientapp.ui.ProgramLogoView) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView) SuppressLint(android.annotation.SuppressLint)

Example 22 with BottomSheetDialog

use of com.google.android.material.bottomsheet.BottomSheetDialog in project android-client by GenesisVision.

the class ConfirmWalletWithdrawBottomSheetFragment method setupDialog.

@SuppressLint("RestrictedApi")
@Override
public void setupDialog(Dialog dialog, int style) {
    super.setupDialog(dialog, style);
    getDialog().setOnShowListener(dialog1 -> {
        BottomSheetDialog d = (BottomSheetDialog) dialog1;
        View bottomSheetInternal = d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
        if (bottomSheetInternal != null) {
            BottomSheetBehavior.from(bottomSheetInternal).setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    });
    View contentView = View.inflate(getContext(), R.layout.fragment_bottomsheet_confirm_wallet_withdraw, null);
    dialog.setContentView(contentView);
    ButterKnife.bind(this, contentView);
    GenesisVisionApplication.getComponent().inject(this);
    EventBus.getDefault().register(this);
    setFonts();
    cancelButton.setEmpty();
    cancelButton.setTextColorByAttrId(R.attr.colorCard);
    updateView();
    subscribeToUser();
}
Also used : BottomSheetDialog(com.google.android.material.bottomsheet.BottomSheetDialog) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView) SuppressLint(android.annotation.SuppressLint)

Example 23 with BottomSheetDialog

use of com.google.android.material.bottomsheet.BottomSheetDialog in project android-client by GenesisVision.

the class FundHistoryDetailsBottomSheetFragment method setupDialog.

@SuppressLint("RestrictedApi")
@Override
public void setupDialog(Dialog dialog, int style) {
    super.setupDialog(dialog, style);
    getDialog().setOnShowListener(dialog1 -> {
        BottomSheetDialog d = (BottomSheetDialog) dialog1;
        View bottomSheetInternal = d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
        if (bottomSheetInternal != null) {
            BottomSheetBehavior.from(bottomSheetInternal).setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    });
    View contentView = View.inflate(getContext(), R.layout.fragment_bottomsheet_fund_history_details, null);
    dialog.setContentView(contentView);
    ButterKnife.bind(this, contentView);
    initRecyclerView();
    updateView();
}
Also used : BottomSheetDialog(com.google.android.material.bottomsheet.BottomSheetDialog) BindView(butterknife.BindView) TextView(android.widget.TextView) SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) SuppressLint(android.annotation.SuppressLint)

Example 24 with BottomSheetDialog

use of com.google.android.material.bottomsheet.BottomSheetDialog in project android-client by GenesisVision.

the class DateRangeBottomSheetFragment method setupDialog.

@SuppressLint("RestrictedApi")
@Override
public void setupDialog(Dialog dialog, int style) {
    super.setupDialog(dialog, style);
    getDialog().setOnShowListener(dialog1 -> {
        BottomSheetDialog d = (BottomSheetDialog) dialog1;
        View bottomSheetInternal = d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
        if (bottomSheetInternal != null) {
            BottomSheetBehavior.from(bottomSheetInternal).setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    });
    View contentView = View.inflate(getContext(), R.layout.fragment_bottomsheet_date_range, null);
    dialog.setContentView(contentView);
    ButterKnife.bind(this, contentView);
    setFonts();
    initOptions();
    updateView();
}
Also used : BottomSheetDialog(com.google.android.material.bottomsheet.BottomSheetDialog) BindView(butterknife.BindView) TextView(android.widget.TextView) View(android.view.View) SuppressLint(android.annotation.SuppressLint)

Example 25 with BottomSheetDialog

use of com.google.android.material.bottomsheet.BottomSheetDialog in project AmazeFileManager by TeamAmaze.

the class CloudSheetFragment method onCreateDialog.

@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
    BottomSheetDialog dialog = (BottomSheetDialog) super.onCreateDialog(savedInstanceState);
    dialog.setOnShowListener(dialog1 -> {
        BottomSheetDialog d = (BottomSheetDialog) dialog1;
        FrameLayout bottomSheet = (FrameLayout) d.findViewById(com.google.android.material.R.id.design_bottom_sheet);
        BottomSheetBehavior.from(bottomSheet).setState(BottomSheetBehavior.STATE_EXPANDED);
    });
    return dialog;
}
Also used : BottomSheetDialog(com.google.android.material.bottomsheet.BottomSheetDialog) FrameLayout(android.widget.FrameLayout) NonNull(androidx.annotation.NonNull)

Aggregations

BottomSheetDialog (com.google.android.material.bottomsheet.BottomSheetDialog)25 View (android.view.View)20 TextView (android.widget.TextView)13 SuppressLint (android.annotation.SuppressLint)12 BindView (butterknife.BindView)12 NonNull (androidx.annotation.NonNull)8 RecyclerView (androidx.recyclerview.widget.RecyclerView)7 BottomSheetBehavior (com.google.android.material.bottomsheet.BottomSheetBehavior)4 ProgramLogoView (vision.genesis.clientapp.ui.ProgramLogoView)4 Window (android.view.Window)3 FrameLayout (android.widget.FrameLayout)3 ListView (android.widget.ListView)3 SearchView (androidx.appcompat.widget.SearchView)3 DialogInterface (android.content.DialogInterface)2 AdapterView (android.widget.AdapterView)2 Nullable (androidx.annotation.Nullable)2 DefaultItemAnimator (androidx.recyclerview.widget.DefaultItemAnimator)2 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)2 MaterialShapeDrawable (com.google.android.material.shape.MaterialShapeDrawable)2 SortDialogAdapter (org.odk.collect.android.adapters.SortDialogAdapter)2