當前位置: 首頁>>代碼示例>>Java>>正文


Java RecyclerView.invalidate方法代碼示例

本文整理匯總了Java中android.support.v7.widget.RecyclerView.invalidate方法的典型用法代碼示例。如果您正苦於以下問題:Java RecyclerView.invalidate方法的具體用法?Java RecyclerView.invalidate怎麽用?Java RecyclerView.invalidate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v7.widget.RecyclerView的用法示例。


在下文中一共展示了RecyclerView.invalidate方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));

    databaseReference3= FirebaseDatabase.getInstance().getReference().child("GDG");
    get();

    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:19,代碼來源:Drishti.java

示例2: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
   View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));
    firebaseAuth3=FirebaseAuth.getInstance();
    databaseReference3= FirebaseDatabase.getInstance().getReference().child("Announcements");


    get();

    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:21,代碼來源:Announcements.java

示例3: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));

    databaseReference3= FirebaseDatabase.getInstance().getReference().child("ACM");
    get();

    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:19,代碼來源:ACM.java

示例4: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));

    databaseReference3= FirebaseDatabase.getInstance().getReference().child("SAE");

    get();


    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:21,代碼來源:SAE.java

示例5: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));

    databaseReference3= FirebaseDatabase.getInstance().getReference().child("GDG");
    get();
    image2=(ImageView)rootView.findViewById(R.id.image2);
   


    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:22,代碼來源:GDG.java

示例6: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));

    databaseReference3= FirebaseDatabase.getInstance().getReference().child("LAC");

    get();


    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:21,代碼來源:LAC.java

示例7: onCreateView

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView= inflater.inflate(R.layout.fragment_announcements, container, false);
    recycle=(RecyclerView)rootView.findViewById(R.id.recycle);

    recycle.setLayoutManager(new LinearLayoutManager(getActivity()));

    databaseReference3= FirebaseDatabase.getInstance().getReference().child("CHRD");

    get();


    recycle.setAdapter(firebaseRecyclerAdapter3);
    firebaseRecyclerAdapter3.notifyDataSetChanged();
    databaseReference3.keepSynced(true);
    recycle.invalidate();
    return rootView;
}
 
開發者ID:khokharnikunj8,項目名稱:SVNITChapters,代碼行數:21,代碼來源:CHRD.java

示例8: onDrawOver

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
private void onDrawOver(Canvas c, RecyclerView parent, ViewHolder selected, List<RecoverAnimation> recoverAnimationList, int actionState, float dX, float dY) {
    int i;
    int recoverAnimSize = recoverAnimationList.size();
    for (i = 0; i < recoverAnimSize; i++) {
        RecoverAnimation anim = (RecoverAnimation) recoverAnimationList.get(i);
        int count = c.save();
        onChildDrawOver(c, parent, anim.mViewHolder, anim.mX, anim.mY, anim.mActionState, false);
        c.restoreToCount(count);
    }
    if (selected != null) {
        count = c.save();
        onChildDrawOver(c, parent, selected, dX, dY, actionState, true);
        c.restoreToCount(count);
    }
    boolean hasRunningAnimation = false;
    for (i = recoverAnimSize - 1; i >= 0; i--) {
        anim = (RecoverAnimation) recoverAnimationList.get(i);
        if (anim.mEnded && !anim.mIsPendingCleanup) {
            recoverAnimationList.remove(i);
        } else if (!anim.mEnded) {
            hasRunningAnimation = true;
        }
    }
    if (hasRunningAnimation) {
        parent.invalidate();
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:28,代碼來源:ItemTouchHelper.java


注:本文中的android.support.v7.widget.RecyclerView.invalidate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。