Search in sources :

Example 1 with LoadingRecyclerView

use of i2p.bote.android.widget.LoadingRecyclerView in project i2p.i2p-bote by i2p.

the class EmailListFragment method onCreateAuthenticatedView.

@Override
public View onCreateAuthenticatedView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    String folderName = getArguments().getString(FOLDER_NAME);
    mFolder = BoteHelper.getMailFolder(folderName);
    boolean isInbox = BoteHelper.isInbox(mFolder);
    View v = inflater.inflate(isInbox ? R.layout.fragment_list_emails_with_refresh : R.layout.fragment_list_emails, container, false);
    mEmailsList = (LoadingRecyclerView) v.findViewById(R.id.emails_list);
    View empty = v.findViewById(R.id.empty);
    ProgressWheel loading = (ProgressWheel) v.findViewById(R.id.loading);
    mEmailsList.setLoadingView(empty, loading);
    mNewEmail = (ImageButton) v.findViewById(R.id.promoted_action);
    mNewEmail.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            startNewEmail();
        }
    });
    if (isInbox) {
        mSwipeRefreshLayout = (MultiSwipeRefreshLayout) v;
        // Set up the MultiSwipeRefreshLayout
        mSwipeRefreshLayout.setColorSchemeResources(R.color.primary, R.color.accent, R.color.primary, R.color.accent);
        mSwipeRefreshLayout.setSwipeableChildren(R.id.emails_list);
        mSwipeRefreshLayout.setOnRefreshListener(this);
    }
    return v;
}
Also used : ProgressWheel(com.pnikosis.materialishprogress.ProgressWheel) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) LoadingRecyclerView(i2p.bote.android.widget.LoadingRecyclerView)

Example 2 with LoadingRecyclerView

use of i2p.bote.android.widget.LoadingRecyclerView in project i2p.i2p-bote by i2p.

the class AddressBookFragment method onCreateAuthenticatedView.

@Override
public View onCreateAuthenticatedView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_list_contacts, container, false);
    mContactsList = (LoadingRecyclerView) v.findViewById(R.id.contacts_list);
    View empty = v.findViewById(R.id.empty);
    ProgressWheel loading = (ProgressWheel) v.findViewById(R.id.loading);
    mContactsList.setLoadingView(empty, loading);
    mPromotedActions = v.findViewById(R.id.promoted_actions);
    ImageButton b = (ImageButton) v.findViewById(R.id.action_new_contact);
    b.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            startNewContact();
        }
    });
    b = (ImageButton) v.findViewById(R.id.action_scan_qr_code);
    b.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            startScanQrCode();
        }
    });
    return v;
}
Also used : ImageButton(android.widget.ImageButton) ProgressWheel(com.pnikosis.materialishprogress.ProgressWheel) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) LoadingRecyclerView(i2p.bote.android.widget.LoadingRecyclerView)

Example 3 with LoadingRecyclerView

use of i2p.bote.android.widget.LoadingRecyclerView in project i2p.i2p-bote by i2p.

the class IdentityListFragment method onCreateAuthenticatedView.

@Override
public View onCreateAuthenticatedView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_list_identities, container, false);
    mIdentitiesList = (LoadingRecyclerView) v.findViewById(R.id.identities_list);
    View empty = v.findViewById(R.id.empty);
    ProgressWheel loading = (ProgressWheel) v.findViewById(R.id.loading);
    mIdentitiesList.setLoadingView(empty, loading);
    mNewIdentity = v.findViewById(R.id.action_new_identity);
    mNewIdentity.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            startNewIdentity();
        }
    });
    return v;
}
Also used : ProgressWheel(com.pnikosis.materialishprogress.ProgressWheel) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) LoadingRecyclerView(i2p.bote.android.widget.LoadingRecyclerView)

Aggregations

RecyclerView (android.support.v7.widget.RecyclerView)3 View (android.view.View)3 ProgressWheel (com.pnikosis.materialishprogress.ProgressWheel)3 LoadingRecyclerView (i2p.bote.android.widget.LoadingRecyclerView)3 ImageButton (android.widget.ImageButton)1