Search in sources :

Example 1 with AboutCategory

use of app.insti.api.model.AboutCategory in project IITB-App by wncc.

the class AboutFragment method onStart.

@Override
public void onStart() {
    super.onStart();
    Toolbar toolbar = getActivity().findViewById(R.id.toolbar);
    toolbar.setTitle("About");
    final Context context = getContext();
    AboutAdapter aboutAdapter = new AboutAdapter(new ArrayList<AboutCategory>() {

        {
            add(new AboutCategory("Maintainer", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("e.aakash", "E. Aakash", "aakash.jpg"));
                }
            }, context));
            add(new AboutCategory("Core Developers", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("varunpatil", "Varun Patil", "varun.jpg"));
                    add(new AboutIndividual("sajalnarang", "Sajal Narang", "sajal.jpg"));
                    add(new AboutIndividual("harshith", "Harshith Goka", "harshith.jpg"));
                }
            }, context));
            add(new AboutCategory("Developers", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("160020012", "Mrunmayi Munkegar", "mrunmayi.jpg"));
                    add(new AboutIndividual("160110009", "Owais Chunawala", "owais.jpg"));
                    add(new AboutIndividual("hrushikeshbodas", "Hrushikesh Bodas", "hrushikesh.jpg"));
                    add(new AboutIndividual("yashkhem", "Yash Khemchandani", "yashkhem.jpg"));
                    add(new AboutIndividual("bavish.kulur", "Bavish Kulur", "bavish.jpg"));
                    add(new AboutIndividual("mayubhattu", "Mayuresh Bhattu", "mayu.jpg"));
                    add(new AboutIndividual("maitreya", "Maitreya Verma", "maitreya.jpg"));
                    add(new AboutIndividual("safwankdb", "Mohd Safwan", "safwan.jpg"));
                    add(new AboutIndividual(null, "Shivam Sharma", "sshivam95.jpg"));
                }
            }, context));
            add(new AboutCategory("Design", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("150040007", "Soham Khadtare", "soham.jpg"));
                }
            }, context));
            add(new AboutCategory("Ideation", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("nihal111", "Nihal Singh", "nihal.jpg"));
                    add(new AboutIndividual("ydidwania", "Yashwarshan Didwania", "ydidwania.jpg"));
                    add(new AboutIndividual("kumar.ayush", "Kumar Ayush", "cheeku.jpg"));
                    add(new AboutIndividual("16D110006", "Sarthak Khandelwal", "sarthak.jpg"));
                }
            }, context));
            add(new AboutCategory("Alumni", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("abhijit.tomar", "Abhijit Tomar", "tomar.jpg"));
                    add(new AboutIndividual(null, "Bijoy Singh Kochar", "bijoy.jpg"));
                    add(new AboutIndividual(null, "Dheerendra Rathor", "dheerendra.jpg"));
                    add(new AboutIndividual(null, "Ranveer Aggarwal", "ranveer.jpg"));
                    add(new AboutIndividual(null, "Aman Gour", "amangour.jpg"));
                }
            }, context));
            add(new AboutCategory("Contribute", new ArrayList<AboutIndividual>() {

                {
                    add(new AboutIndividual("https://github.com/wncc/instiapp-api", "Django API", "python.png", TYPE_LINK));
                    add(new AboutIndividual("https://github.com/wncc/instiapp-android", "Android App", "android.png", TYPE_LINK));
                    add(new AboutIndividual("https://github.com/wncc/instiapp-angular", "Angular PWA", "angular.png", TYPE_LINK));
                }
            }, context));
        }
    });
    RecyclerView aboutRecyclerView = getActivity().findViewById(R.id.about_recycler_view);
    aboutRecyclerView.setAdapter(aboutAdapter);
    FlexboxLayoutManager manager = new FlexboxLayoutManager(context, FlexDirection.ROW);
    manager.setJustifyContent(JustifyContent.CENTER);
    aboutRecyclerView.setLayoutManager(manager);
}
Also used : Context(android.content.Context) AboutAdapter(app.insti.adapter.AboutAdapter) AboutCategory(app.insti.api.model.AboutCategory) FlexboxLayoutManager(com.google.android.flexbox.FlexboxLayoutManager) AboutIndividual(app.insti.api.model.AboutIndividual) RecyclerView(androidx.recyclerview.widget.RecyclerView) Toolbar(androidx.appcompat.widget.Toolbar)

Aggregations

Context (android.content.Context)1 Toolbar (androidx.appcompat.widget.Toolbar)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 AboutAdapter (app.insti.adapter.AboutAdapter)1 AboutCategory (app.insti.api.model.AboutCategory)1 AboutIndividual (app.insti.api.model.AboutIndividual)1 FlexboxLayoutManager (com.google.android.flexbox.FlexboxLayoutManager)1