use of com.gladysinc.gladys.Adapters.BrainSentencesAdapter in project Gladys-Android-App by LeptitGeek.
the class ApprovedSentencesFragment method onCreateAdapterView.
public void onCreateAdapterView() {
List<BrainSentences> brainSentencesList = SugarRecord.find(BrainSentences.class, "status=?", "approved");
if (brainSentencesList.size() > 0) {
recycler_view.setVisibility(View.VISIBLE);
no_data_approved.setVisibility(View.INVISIBLE);
no_data_approved_ic.setVisibility(View.INVISIBLE);
adapter = new BrainSentencesAdapter(brainSentencesList, this);
AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);
recycler_view.setAdapter(new SlideInLeftAnimationAdapter(alphaAdapter));
recycler_view.invalidate();
} else {
recycler_view.setVisibility(View.INVISIBLE);
no_data_approved.setVisibility(View.VISIBLE);
no_data_approved_ic.setVisibility(View.VISIBLE);
}
}
use of com.gladysinc.gladys.Adapters.BrainSentencesAdapter in project Gladys-Android-App by LeptitGeek.
the class AllSentencesFragment method onCreateAdapterView.
public void onCreateAdapterView() {
long count = SugarRecord.count(BrainSentences.class);
if (count > 0) {
recycler_view.setVisibility(View.VISIBLE);
no_data_all.setVisibility(View.INVISIBLE);
no_data_all_ic.setVisibility(View.INVISIBLE);
List<BrainSentences> data = SugarRecord.listAll(BrainSentences.class);
adapter = new BrainSentencesAdapter(data, this);
AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);
recycler_view.setAdapter(new SlideInLeftAnimationAdapter(alphaAdapter));
} else {
recycler_view.setVisibility(View.INVISIBLE);
no_data_all.setVisibility(View.VISIBLE);
no_data_all_ic.setVisibility(View.VISIBLE);
}
}
use of com.gladysinc.gladys.Adapters.BrainSentencesAdapter in project Gladys-Android-App by LeptitGeek.
the class PendingSentencesFragment method onCreateAdapterView.
public void onCreateAdapterView() {
List<BrainSentences> brainSentencesList = SugarRecord.find(BrainSentences.class, "status=?", "pending");
if (brainSentencesList.size() > 0) {
recycler_view.setVisibility(View.VISIBLE);
no_data_pending.setVisibility(View.INVISIBLE);
no_data_pending_ic.setVisibility(View.INVISIBLE);
adapter = new BrainSentencesAdapter(brainSentencesList, this);
AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);
recycler_view.setAdapter(new SlideInLeftAnimationAdapter(alphaAdapter));
} else {
recycler_view.setVisibility(View.INVISIBLE);
no_data_pending.setVisibility(View.VISIBLE);
no_data_pending_ic.setVisibility(View.VISIBLE);
}
}
use of com.gladysinc.gladys.Adapters.BrainSentencesAdapter in project Gladys-Android-App by LeptitGeek.
the class RejectedSentencesFragment method onCreateAdapterView.
public void onCreateAdapterView() {
List<BrainSentences> brainSentencesList = SugarRecord.find(BrainSentences.class, "status=?", "rejected");
if (brainSentencesList.size() > 0) {
recycler_view.setVisibility(View.VISIBLE);
no_data_rejected.setVisibility(View.INVISIBLE);
no_data_rejected_ic.setVisibility(View.INVISIBLE);
adapter = new BrainSentencesAdapter(brainSentencesList, this);
AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);
recycler_view.setAdapter(new SlideInLeftAnimationAdapter(alphaAdapter));
} else {
recycler_view.setVisibility(View.INVISIBLE);
no_data_rejected.setVisibility(View.VISIBLE);
no_data_rejected_ic.setVisibility(View.VISIBLE);
}
}
Aggregations