Commit ff51f787 authored by Roger Barton's avatar Roger Barton
Browse files

Renaming Files for consistency

parent e6979d3e
Pipeline #5895 passed with stages
in 5 minutes and 49 seconds
......@@ -15,9 +15,9 @@
<application
android:name=".core.MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@drawable/ic_amiv_logo_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@drawable/ic_amiv_logo_icon"
android:screenOrientation="portrait"
android:theme="@style/AppThemeLight">
......@@ -114,7 +114,7 @@
<meta-data
android:name="android.app.searchable"
android:resource="@xml/checkin_searchable" />
android:resource="@xml/checkin_search_members_searchable" />
</activity>
<activity
......
......@@ -34,7 +34,7 @@ public class BarcodeIdActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.checkin_activity_barcode_id);
setContentView(R.layout.checkin_barcode_id);
//Set up toolbar and back button
Util.SetupToolbar(this, true);
......@@ -85,7 +85,7 @@ public class BarcodeIdActivity extends AppCompatActivity {
Field f = swipeRefreshLayout.getClass().getDeclaredField("mCircleView");
f.setAccessible(true);
ImageView img = (ImageView)f.get(swipeRefreshLayout);
img.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_amiv_logo_icon_scaled, null));
img.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_amiv_logo_icon_bordered, null));
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
......
......@@ -15,11 +15,11 @@ import ch.amiv.android_app.R;
* Created by Roger on 06-Feb-18.
*/
public class CustomListAdapter extends ArrayAdapter<Member> {
public class CustomListAdapter extends ArrayAdapter<MemberData> {
private final Activity context;
private final List<Member> members;
private final List<MemberData> members;
public CustomListAdapter(Activity context, List<Member> _members){
public CustomListAdapter(Activity context, List<MemberData> _members){
super(context, R.layout.checkin_list_item_member, _members);
......@@ -36,7 +36,7 @@ public class CustomListAdapter extends ArrayAdapter<Member> {
TextView checkinField = rowView.findViewById(R.id.checkinStatus);
TextView membershipField = rowView.findViewById(R.id.infoField2);
Member m = members.get(position);
MemberData m = members.get(position);
nameField.setText(m.firstname + " " + m.lastname);
infoField.setText(m.GetLegiFormatted());
checkinField.setText((m.checkedIn ? "In" : "Out"));
......
......@@ -62,14 +62,14 @@ public class EventData {
return true;
}
public List<KeyValuePair> GetInfosAsKeyValuePairs ()
public List<StringPair> GetInfosAsKeyValuePairs ()
{
List<KeyValuePair> list = new ArrayList<KeyValuePair>();
list.add(new KeyValuePair("Event", name));
list.add(new KeyValuePair("Event Type", eventType.toString()));
list.add(new KeyValuePair("Sign-ups", "" + signupCount));
list.add(new KeyValuePair("Description", description));
list.add(new KeyValuePair("Start Time", startTime));
List<StringPair> list = new ArrayList<StringPair>();
list.add(new StringPair("Event", name));
list.add(new StringPair("Event Type", eventType.toString()));
list.add(new StringPair("Sign-ups", "" + signupCount));
list.add(new StringPair("Description", description));
list.add(new StringPair("Start Time", startTime));
return list;
}
......
......@@ -19,10 +19,10 @@ import java.util.List;
public class EventDatabase {
public static EventDatabase instance;
final List<Member> members = new ArrayList<Member>();
final List<MemberData> members = new ArrayList<MemberData>();
public EventData eventData = new EventData();
public List<KeyValuePair> stats = new ArrayList<KeyValuePair>();
public Comparator<Member> memberComparator;
public List<StringPair> stats = new ArrayList<StringPair>();
public Comparator<MemberData> memberComparator;
public enum MemberComparator {None, Name, Membership, Status, Legi}
private MemberComparator currentSorting = MemberComparator.None;
private boolean invertSorting = false;
......@@ -40,7 +40,7 @@ public class EventDatabase {
members.clear();
for (int i = 0; i < _members.length(); i++) {
try {
Member m = new Member(_members.getJSONObject(i));
MemberData m = new MemberData(_members.getJSONObject(i));
members.add(m);
} catch (JSONException e) {
e.printStackTrace();
......@@ -57,7 +57,7 @@ public class EventDatabase {
for (int i = 0; i < statSource.length(); i++) {
JSONObject j = statSource.getJSONObject(i);
stats.add(new KeyValuePair(j.getString("key"), j.get("value").toString()));
stats.add(new StringPair(j.getString("key"), j.get("value").toString()));
//also imply event type if it has not been parsed from the json
if ((!hasEventInfos || EventDatabase.instance.eventData.eventType == EventData.EventType.NotSet || EventDatabase.instance.eventData.eventType == EventData.EventType.Unknown)
......@@ -73,7 +73,7 @@ public class EventDatabase {
}
}
public void SetMemberSortingType(Comparator<Member> comparator)
public void SetMemberSortingType(Comparator<MemberData> comparator)
{
memberComparator = comparator;
SortMembers();
......@@ -90,10 +90,10 @@ public class EventDatabase {
invertSorting = false;
currentSorting = sortingType;
Comparator<Member> comparator;
comparator = new Comparator<Member>() {
Comparator<MemberData> comparator;
comparator = new Comparator<MemberData>() {
@Override
public int compare(Member a, Member b) {
public int compare(MemberData a, MemberData b) {
switch (sortingType)
{
case Name:
......
......@@ -40,7 +40,7 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Util.SetWindowResizing(this, true);
setContentView(R.layout.checkin_activity_main);
setContentView(R.layout.checkin_main);
InitialiseUI();
CheckPermissions();
......@@ -60,7 +60,7 @@ public class MainActivity extends AppCompatActivity {
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.checkin_ac_main_toolbar_menu, menu);
getMenuInflater().inflate(R.menu.checkin_main_toolbar_menu, menu);
return super.onCreateOptionsMenu(menu);
}
......@@ -149,7 +149,7 @@ public class MainActivity extends AppCompatActivity {
mWaitingOnServer = true;
mInvalidPinLabel.setText(R.string.wait);
if(!ServerRequests.CheckConnection(getApplicationContext())) {
if(!Requests.CheckConnection(getApplicationContext())) {
ApplyServerResponse(true, 0, getResources().getString(R.string.no_internet));
return;
}
......@@ -162,7 +162,7 @@ public class MainActivity extends AppCompatActivity {
//Create a callback, this is what happens when we get the response
ServerRequests.OnCheckPinReceivedCallback callback = new ServerRequests.OnCheckPinReceivedCallback() {
Requests.OnCheckPinReceivedCallback callback = new Requests.OnCheckPinReceivedCallback() {
@Override
public void OnStringReceived(final boolean validResponse, final int statusCode, final String data) {
mPinField.post(new Runnable() { //delay to other thread by using a ui element, as this is in a callback on another thread
......@@ -172,7 +172,7 @@ public class MainActivity extends AppCompatActivity {
}
};
ServerRequests.CheckPin(this, callback);
Requests.CheckPin(this, callback);
//StartScanActivity(); //NOTE: Uncomment for debugging without valid pin
}
......
......@@ -7,7 +7,7 @@ import org.json.JSONObject;
* This class stores the data that an individual member has, matches what is giver by the server (see server side project's README_API)
*/
public class Member {
public class MemberData {
public String serverId;
public boolean checkedIn;
public String email;
......@@ -19,7 +19,7 @@ public class Member {
public String nethz;
public String checkinCount; //how often the person has been checked in
public Member (JSONObject _member)
public MemberData(JSONObject _member)
{
serverId = _member.optString("_id");
email = _member.optString("email");
......@@ -35,7 +35,7 @@ public class Member {
checkinCount = "-";
}
public Member (String _serverId, boolean _checkedIn, String _email, String _firstname, String _lastname, String _legi, String _membership, String _nethz, String _checkinCount)
public MemberData(String _serverId, boolean _checkedIn, String _email, String _firstname, String _lastname, String _legi, String _membership, String _nethz, String _checkinCount)
{
serverId = _serverId;
checkedIn = _checkedIn;
......
......@@ -31,7 +31,7 @@ public class MemberListActivity extends AppCompatActivity {
private Runnable refreshMemberDB = new Runnable() { //Refresh stats every x seconds
@Override
public void run() {
ServerRequests.UpdateMemberDB(getApplicationContext(), new ServerRequests.OnDataReceivedCallback() {
Requests.UpdateMemberDB(getApplicationContext(), new Requests.OnDataReceivedCallback() {
@Override
public void OnDataReceived() {
UpdateList();
......@@ -49,14 +49,14 @@ public class MemberListActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
setContentView(R.layout.checkin_activity_member_list);
setContentView(R.layout.checkin_member_list);
UpdateList();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.checkin_ac_member_list_menu, menu);
getMenuInflater().inflate(R.menu.checkin_member_list_menu, menu);
return super.onCreateOptionsMenu(menu);
}
......@@ -105,7 +105,7 @@ public class MemberListActivity extends AppCompatActivity {
// specify an adapter (see also next example)
mRecyclerAdapter = new MemberListAdapter(EventDatabase.instance.members, EventDatabase.instance.stats, EventDatabase.instance.eventData.GetInfosAsKeyValuePairs());
mRecyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_anim_falldown));
mRecyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_falldown));
mRecyclerView.setAdapter(mRecyclerAdapter);
AnimateList(null);
......
......@@ -18,9 +18,9 @@ import ch.amiv.android_app.R;
public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final List<Integer> headerList = new ArrayList<>();
private final List<KeyValuePair> statList;
private final List<Member> memberList;
private final List<KeyValuePair> eventInfoList;
private final List<StringPair> statList;
private final List<MemberData> memberList;
private final List<StringPair> eventInfoList;
/**
* Defining our own view holder which maps the layout items to view variables which can then later be accessed, and text value set etc
......@@ -70,7 +70,7 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
}
public MemberListAdapter(List<Member> _members, List<KeyValuePair> _stats, List<KeyValuePair> _eventInfos) {
public MemberListAdapter(List<MemberData> _members, List<StringPair> _stats, List<StringPair> _eventInfos) {
headerList.add(R.string.stat_title);
headerList.add(R.string.people_title);
headerList.add(R.string.event_info_title);
......@@ -150,13 +150,13 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
break;
case 1: //stat
KeyValueHolder statHolder = (KeyValueHolder)holder;
KeyValuePair stat = statList.get(holder.getAdapterPosition() -1);
StringPair stat = statList.get(holder.getAdapterPosition() -1);
statHolder.nameField.setText(stat.name);
statHolder.valueField.setText(stat.value);
break;
case 2: //member
MemberHolder memberHolder = (MemberHolder)holder;
Member m = memberList.get(holder.getAdapterPosition() - statList.size() - 2);
MemberData m = memberList.get(holder.getAdapterPosition() - statList.size() - 2);
memberHolder.nameField.setText(m.firstname + " " + m.lastname);
if(EventDatabase.instance.eventData.checkinType == EventData.CheckinType.Counter)
......@@ -175,7 +175,7 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
break;
case 3: //info
KeyValueHolder infoHolder = (KeyValueHolder)holder;
KeyValuePair info = eventInfoList.get(holder.getAdapterPosition() - statList.size() - memberList.size() - 3);
StringPair info = eventInfoList.get(holder.getAdapterPosition() - statList.size() - memberList.size() - 3);
infoHolder.nameField.setText(info.name);
infoHolder.valueField.setText(info.value);
break;
......
......@@ -31,7 +31,7 @@ import ch.amiv.android_app.core.Settings;
* Used for getting/sending data from/to the server, if it is required in several activities.
*/
public final class ServerRequests {
public final class Requests {
private static String ON_SUBMIT_PIN_URL_EXT = "/checkpin";
private static String ON_SUBMIT_LEGI_URL_EXT = "/mutate";
private static String GET_DATA_URL_EXT = "/checkin_update_data";
......
......@@ -95,7 +95,7 @@ public class ScanActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
setContentView(R.layout.checkin_activity_scan);
setContentView(R.layout.checkin_scan);
InitialiseUI();
InitialiseBarcodeDetection();
......@@ -287,7 +287,7 @@ public class ScanActivity extends AppCompatActivity {
Settings.Vibrate(Settings.VibrateTime.SHORT, getApplicationContext());
if(!ServerRequests.CheckConnection(getApplicationContext())) {
if(!Requests.CheckConnection(getApplicationContext())) {
SetUIFromResponse_Invalid(0, getResources().getString(R.string.no_internet));
return;
}
......@@ -295,7 +295,7 @@ public class ScanActivity extends AppCompatActivity {
SetWaitingOnServer(true); //Clear UI
mResponseLabel.setVisibility(View.INVISIBLE);
ServerRequests.OnJsonReceivedCallback callback = new ServerRequests.OnJsonReceivedCallback() {
Requests.OnJsonReceivedCallback callback = new Requests.OnJsonReceivedCallback() {
@Override
public void OnJsonReceived(final int statusCode, final JSONObject data) {
mResponseLabel.post(new Runnable() { //delay to other thread by using a ui element, as this is in a callback on another thread
......@@ -304,7 +304,7 @@ public class ScanActivity extends AppCompatActivity {
Log.e("json", "mutate json received: " + data.toString());
try {
msg = data.getString("message");
Member m = new Member(data.getJSONObject("signup"));
MemberData m = new MemberData(data.getJSONObject("signup"));
SetUIFromResponse_Valid(statusCode, msg, m);
}
catch (JSONException e){
......@@ -322,7 +322,7 @@ public class ScanActivity extends AppCompatActivity {
}
};
ServerRequests.CheckLegi(this, callback, leginr, mIsCheckingIn);
Requests.CheckLegi(this, callback, leginr, mIsCheckingIn);
}
/**
......@@ -330,7 +330,7 @@ public class ScanActivity extends AppCompatActivity {
* @param statusCode http status code from the response, eg 200 or 400
* @param member the text received from the server about our post request
*/
private void SetUIFromResponse_Valid(int statusCode, String message, Member member)
private void SetUIFromResponse_Valid(int statusCode, String message, MemberData member)
{
SetWaitingOnServer(false);
if(message.isEmpty())
......@@ -341,7 +341,7 @@ public class ScanActivity extends AppCompatActivity {
mResponseLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX, mResponseLabelDefFontSize);
mTickImage.setVisibility(View.VISIBLE);
mBGTint.setVisibility(View.VISIBLE);
mTickImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_anim_grow));
mTickImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_grow));
mTickImage.setColorFilter(getResources().getColor(R.color.valid));
if(EventDatabase.instance.eventData.eventType == EventData.EventType.Counter) {
......@@ -383,7 +383,7 @@ public class ScanActivity extends AppCompatActivity {
mResponseLabel.setText(responseText);
mTickImage.setVisibility(View.VISIBLE);
mTickImage.setColorFilter(getResources().getColor(R.color.valid));
mTickImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_anim_grow));
mTickImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_grow));
mBGTint.setVisibility(View.VISIBLE);
......@@ -405,7 +405,7 @@ public class ScanActivity extends AppCompatActivity {
mResponseLabel.setVisibility(View.VISIBLE);
mResponseLabel.setText(R.string.no_internet);
mCrossImage.setVisibility(View.VISIBLE);
mCrossImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_anim_grow));
mCrossImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_grow));
mBGTint.setVisibility(View.VISIBLE);
mBGTint.setColorFilter(getResources().getColor(R.color.invalid));
}
......@@ -414,7 +414,7 @@ public class ScanActivity extends AppCompatActivity {
mResponseLabel.setVisibility(View.VISIBLE);
mResponseLabel.setText(responseText);
mCrossImage.setVisibility(View.VISIBLE);
mCrossImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_anim_grow));
mCrossImage.startAnimation(AnimationUtils.loadAnimation(this, R.anim.item_grow));
mBGTint.setVisibility(View.VISIBLE);
mBGTint.setColorFilter(getResources().getColor(R.color.invalid));
......@@ -422,7 +422,7 @@ public class ScanActivity extends AppCompatActivity {
}
//decrease font size for long messages, usually errors
if (responseText.length() < 40)
if (responseText.length() < 50)
mResponseLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX, mResponseLabelDefFontSize);
else
mResponseLabel.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16f);
......@@ -464,8 +464,8 @@ public class ScanActivity extends AppCompatActivity {
if(EventDatabase.instance == null)
new EventDatabase();
ServerRequests.UpdateMemberDB(getApplicationContext(),
new ServerRequests.OnDataReceivedCallback(){
Requests.UpdateMemberDB(getApplicationContext(),
new Requests.OnDataReceivedCallback(){
@Override
public void OnDataReceived()
{
......@@ -491,7 +491,7 @@ public class ScanActivity extends AppCompatActivity {
boolean showRStat = (EventDatabase.instance.stats.size() >= 1);
if(showLStat) {
KeyValuePair lStat = EventDatabase.instance.stats.get(0);
StringPair lStat = EventDatabase.instance.stats.get(0);
mLeftStatValue.setText(lStat.value);
//mLeftStatValue.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorValid));
mLeftStatDesc.setText(lStat.name);
......@@ -500,7 +500,7 @@ public class ScanActivity extends AppCompatActivity {
mLeftStatDesc.setVisibility(showLStat ? View.VISIBLE : View.INVISIBLE);
if(showRStat) {
KeyValuePair rStat = EventDatabase.instance.stats.get(1);
StringPair rStat = EventDatabase.instance.stats.get(1);
mRightStatValue.setText(rStat.value);
//mRightStatValue.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorInvalid));
mRightStatDesc.setText(rStat.name);
......
......@@ -25,14 +25,14 @@ public class SearchMembersActivity extends AppCompatActivity {
RecyclerView.Adapter mRecyclerAdapter;
RecyclerView.LayoutManager mRecyclerLayoutAdapter;
public List<Member> searchResults = new ArrayList<Member>(); //This is the list of search results, will dynamically change size of course
public List<MemberData> searchResults = new ArrayList<MemberData>(); //This is the list of search results, will dynamically change size of course
String prevQuery = "";
private final Handler handler = new Handler(); //similar as in scanActivity, to keep refreshing the data
private Runnable refreshMemberDB = new Runnable() { //Refresh stats every x seconds
@Override
public void run() {
ServerRequests.UpdateMemberDB(getApplicationContext(), new ServerRequests.OnDataReceivedCallback() {
Requests.UpdateMemberDB(getApplicationContext(), new Requests.OnDataReceivedCallback() {
@Override
public void OnDataReceived() {
UpdateList();
......@@ -49,7 +49,7 @@ public class SearchMembersActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.checkin_activity_search_members);
setContentView(R.layout.checkin_search_members);
UpdateList();
}
......@@ -58,7 +58,7 @@ public class SearchMembersActivity extends AppCompatActivity {
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.checkin_ac_search_menu, menu);
getMenuInflater().inflate(R.menu.checkin_search_members_menu, menu);
MenuItem menuItem = menu.findItem(R.id.menuSearch);
final SearchView searchView = (SearchView) menuItem.getActionView();
......@@ -109,7 +109,7 @@ public class SearchMembersActivity extends AppCompatActivity {
mRecyclerView.setLayoutManager(mRecyclerLayoutAdapter);
mRecyclerAdapter = new SearchMembersListAdapter(searchResults);
mRecyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_anim_falldown)); //Here we give the searchResults array and use the SearchMemberListAdapter
mRecyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_falldown)); //Here we give the searchResults array and use the SearchMemberListAdapter
mRecyclerView.setAdapter(mRecyclerAdapter);
AnimateList(null);
......
......@@ -17,7 +17,7 @@ import ch.amiv.android_app.R;
*/
public class SearchMembersListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final List<Member> memberList;
private final List<MemberData> memberList;
public static class MemberHolder extends RecyclerView.ViewHolder {
TextView nameField;
......@@ -43,7 +43,7 @@ public class SearchMembersListAdapter extends RecyclerView.Adapter<RecyclerView.
}
}
public SearchMembersListAdapter(List<Member> _members) {
public SearchMembersListAdapter(List<MemberData> _members) {
memberList = _members;
}
......@@ -92,7 +92,7 @@ public class SearchMembersListAdapter extends RecyclerView.Adapter<RecyclerView.
{
case 0: //member
MemberHolder memberHolder = (MemberHolder)holder;
Member m = memberList.get(holder.getAdapterPosition());
MemberData m = memberList.get(holder.getAdapterPosition());
memberHolder.nameField.setText(m.firstname + " " + m.lastname);
if(EventDatabase.instance.eventData.checkinType == EventData.CheckinType.Counter)
......
......@@ -29,7 +29,7 @@ public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.checkin_activity_settings);
setContentView(R.layout.checkin_settings);
Util.SetupToolbar(this,true);
Util.SetWindowResizing(this,true);
......
......@@ -4,11 +4,11 @@ package ch.amiv.android_app.checkin;
* Created by roger on 01/03/2018.
*/
public class KeyValuePair {
public class StringPair {
public String name;
public String value;
public KeyValuePair(String name, String value) {
public StringPair(String name, String value) {
this.name = name;
this.value = value;
}
......
......@@ -64,7 +64,7 @@ public class IntroActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.core_activity_intro);
setContentView(R.layout.core_intro);
viewPager = findViewById(R.id.viewPager);
dotsLayout = findViewById(R.id.layoutDots);
......
......@@ -120,7 +120,7 @@ public class ListFragment extends Fragment {
recyclerAdapter = new JobListAdapter(MainActivity.instance);
if(recyclerAdapter != null) {
recyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(MainActivity.instance, R.anim.layout_anim_falldown));
recyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(MainActivity.instance, R.anim.layout_falldown));
recyclerView.setAdapter(recyclerAdapter);
AnimateList(null);
......@@ -175,7 +175,7 @@ public class ListFragment extends Fragment {
Field f = swipeRefreshLayout.getClass().getDeclaredField("mCircleView");
f.setAccessible(true);
ImageView img = (ImageView)f.get(swipeRefreshLayout);
img.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_amiv_logo_icon_scaled, null));
img.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_amiv_logo_icon_bordered, null));
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
......@@ -208,7 +208,7 @@ public class ListFragment extends Fragment {
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.core_frag_list, container, false);
View v = inflater.inflate(R.layout.core_main_frag_list, container, false);
return v;
}
......
......@@ -5,12 +5,10 @@ import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;