parent
b7b77a9b72
commit
f5d0cdf149
@ -1,7 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
public class GoodItemFragment extends Fragment {
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package com.example.test.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.example.test.R;
|
||||
import com.example.test.activity.HomeActivity;
|
||||
import com.example.test.adapter.GoodKindAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GoodKindFragment extends Fragment {
|
||||
private View view;
|
||||
private HomeActivity activity;
|
||||
private Handler handler;
|
||||
private ListView listView;
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
view = inflater.inflate(R.layout.good_kind_listview, container, false);
|
||||
activity = (HomeActivity) getActivity();
|
||||
handler = activity.getHandler();
|
||||
listView = (ListView) view.findViewById(R.id.good_kind_listview);
|
||||
GoodKindAdapter adapter = new GoodKindAdapter(activity, activity.getProductKindStorage().getNames());
|
||||
listView.setAdapter(adapter);
|
||||
return view;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue