0

I want to create a BottomSheet like : BottomSheet picture

and when it scrolled up : fully expend picture

here is the way i tried :

package com.amir.todone.fragments;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.amir.todone.R;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;

public class AddTaskBottomDialog extends BottomSheetDialogFragment  {
    public static AddTaskBottomDialog newInstance() {
        return new AddTaskBottomDialog();
    }
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.new_task_bottomsheet_layout,container,false);
        return v;
    }
}

and to show it :

ddTaskBottomDialog taskBottomDialog = AddTaskBottomDialog.newInstance();
        taskBottomDialog.show(getSupportFragmentManager(),"add_task_dialog_fragment");

Bottom sheet dialog fragment , result

but its not working like that . i want it to expand complete with app bar

I would really appreciate if someone could help me out with it.

  • we are here to help you, just show what you have tried, whats your result and where do you have exact coding problem - any exception or undesired behavior? if you don't have a line of code to share then no one will answer your broad question, we are not tutors, we aren't here for providing fully working, pretty big examples and working snippets for free. just learn some more, "android bottom sheet" pasted inside any search engine prints plenty of articles and tutorials – snachmsm Jan 09 '22 at 21:04
  • @snachmsm Thanks for the tips , I edited the question . can you help me know ? – Amir Rahimian Jan 09 '22 at 21:31

0 Answers0