Trying to call function in fragment from different class (Java - Android Studio) : I need to call the function in my portfolioActivity fragment that comes from the class portfolioListAdapter. It says my parameters are incorrect. This function works just fine when I'm not using a fragment, but as I am linking my fragment to a navigation drawer, it is necessary to keep it this way.
Here is my fragment:

   
    public class portfolioActivity extends Fragment {

    ListView portfolioList;
    String[] stockTicker={"AAPL", "GOOG", "MSFT"};
    double[] stockPrice={138.96, 830.63, 64.01};
    int[] shares={5, 2, 10};
    double[] percentChange={0.59, 0.55, 1.43};

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.portfolio_layout, container, false);

        portfolioList = (ListView) getView().findViewById(R.id.portfolioListView);
        //ADAPTER
        ListAdapter adapter = new portfolioListAdapter(this, stockTicker, stockPrice, shares, percentChange);
        portfolioList.setAdapter(adapter);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        getActivity().setTitle("Portfolio");
    }
    }    

My error comes when I try to call portfolioListAdapter(). It says there is a problem with the "this" parameter.

Here is my other class:
    
    public class portfolioListAdapter extends ArrayAdapter<String> {

    //DECLARATIONS
    String[] stockTicker={};
    double[] stockPrice={};
    int[] shares={};
    double[] percentChange={};
    Context c;
    LayoutInflater inflater;

    public portfolioListAdapter(Context context, String[] stockTicker,
                                double[] stockPrice, int[] shares, double[] percentChange) {

        super(context, R.layout.portfolio_row_model, stockTicker);

        this.c=context;
        this.stockTicker=stockTicker;
        this.stockPrice=stockPrice;
        this.shares=shares;
        this.percentChange=percentChange;
    }

    public class ViewHolder
    {
        TextView stockTicker;
        TextView stockPrice;
        TextView shares;
        TextView totalValue;
        TextView percentChange;
    }

    @NonNull
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        if(convertView==null)
        {
            inflater=(LayoutInflater) c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView=inflater.inflate(R.layout.portfolio_row_model, null);
        }

        // OUR VIEWHOLDER OBJECT
        final ViewHolder holder = new ViewHolder();

        //INITIALIZE VIEWS
        holder.stockTicker= (TextView) convertView.findViewById(R.id.list_portfolio_ticker);
        holder.stockPrice= (TextView) convertView.findViewById(R.id.list_portfolio_price);
        holder.shares= (TextView) convertView.findViewById(R.id.list_portfolio_shares);
        holder.totalValue= (TextView) convertView.findViewById(R.id.list_portfolio_value);
        holder.percentChange= (TextView) convertView.findViewById(R.id.list_portfolio_change);

        //ASSIGN VIEWS
        holder.stockTicker.setText(stockTicker[position]);
        holder.stockPrice.setText(String.valueOf("$"+stockPrice[position]));
        holder.shares.setText(String.valueOf(shares[position]));
        holder.totalValue.setText(String.valueOf("$"+(stockPrice[position]*shares[position])));
        holder.percentChange.setText(String.valueOf(percentChange[position]+"%"));


        //return super.getView(position, convertView, parent);
        return convertView;
    }
    }
