Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package p.alpine12.rootpixelproduct.fragment;
- import android.os.Bundle;
- import android.support.design.widget.BottomNavigationView;
- import android.support.v4.app.Fragment;
- import android.support.v7.widget.CardView;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.ViewGroup;
- import android.widget.Button;
- import p.alpine12.rootpixelproduct.R;
- /**
- * A simple {@link Fragment} subclass.
- */
- public class HomeFragment extends Fragment {
- public HomeFragment() {
- // Required empty public constructor
- }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // Inflate the layout for this fragment
- View view = inflater.inflate(R.layout.fragment_home, container, false);
- CardView btn_produk = (CardView) view.findViewById(R.id.cv_showProduk);
- BottomNavigationView navigation = (BottomNavigationView) view.findViewById(R.id.navigation);
- btn_produk.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- android.support.v4.app.FragmentTransaction fr = getFragmentManager().beginTransaction();
- fr.replace(R.id.fl_main, new Produk_Menu());
- fr.commit();
- }
- });
- return view;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement