How to set List Fragment dimensions and location

I want to open a ListFragment once the user click on a edit text. I set edit text focusable to false and open a ListFragment using this class:

public static class SimpleListFragment extends ListFragment
{
    List<Integer> listValues = new ArrayList<>();

    public void setListValues(List<Integer> listValues) {
        this.listValues = listValues;
    }

    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        // Try to set ListFragment size - crash the app
        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(Util.convertToDps(60), ViewGroup.LayoutParams.WRAP_CONTENT);
        container.setLayoutParams(params);

        // TODO set location

        ArrayAdapter<Integer> adapter = new ArrayAdapter<Integer>(
                inflater.getContext(), android.R.layout.simple_list_item_1, listValues);
        setListAdapter(adapter);
        return super.onCreateView(inflater, container, savedInstanceState);
    }
}

But, I have few issues with this fragment:

  1. I want to set the width and the height, but failed to do this (P.S. I know in DialogFragment I can use getDialog.getWindow, like here, but I haven't getDialog in ListFragment).
  2. After the fragment is not on match screen size I want to set X and Y coordinates (for example, to set the top of the fragment on the edit text).

So bottom line, the questions are: How can I set ListFragment size and how can I set the location ?