本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}