added search

parent 1416e297
package com.example.labstatus; package com.example.labstatus;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.graphics.drawable.ColorDrawable;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import com.example.labstatus.ui.home.HomeFragment;
import com.example.labstatus.ui.home.HomeViewModel;
import com.example.labstatus.ui.home.RecyclerViewAdapterSL2;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.LayoutManager;
import android.os.Handler; import android.os.Handler;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
...@@ -28,13 +44,20 @@ public class DetailActivity extends AppCompatActivity { ...@@ -28,13 +44,20 @@ public class DetailActivity extends AppCompatActivity {
String lab,pc; String lab,pc;
ProgressBar bar; ProgressBar bar;
String TAG="Datail Activity"; String TAG="Datail Activity";
TextView cpu_tv,core_tv; TextView cpu_tv,core_tv;
int counter=0; int counter=0;
FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab_search,fab; FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab;
boolean isFABOpen=false; boolean isFABOpen=false;
Boolean isKeyboardConnected=false; Boolean isKeyboardConnected=false;
Boolean isMouseConnected=false; Boolean isMouseConnected=false;
RecyclerView recyclerView;
EditText editText;
SoftListAdapter mAdapter;
RecyclerView.LayoutManager layoutManager;
ArrayList<String> software=new ArrayList<>();
final Handler handler = new Handler(); final Handler handler = new Handler();
HashMap<String,Double> status=new HashMap<>(); HashMap<String,Double> status=new HashMap<>();
@Override @Override
...@@ -43,8 +66,18 @@ public class DetailActivity extends AppCompatActivity { ...@@ -43,8 +66,18 @@ public class DetailActivity extends AppCompatActivity {
setContentView(R.layout.activity_detail); setContentView(R.layout.activity_detail);
lab=getIntent().getStringExtra("lab"); lab=getIntent().getStringExtra("lab");
pc=getIntent().getStringExtra("pc"); pc=getIntent().getStringExtra("pc");
bar=findViewById(R.id.pBar_detail); bar=findViewById(R.id.pBar_detail);
bar.setVisibility(View.GONE); bar.setVisibility(View.GONE);
editText=findViewById(R.id.soft_search);
recyclerView=findViewById(R.id.my_recycler_view_lst);
layoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setHasFixedSize(true);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),DividerItemDecoration.VERTICAL);
recyclerView.addItemDecoration(dividerItemDecoration);
// specify an adapter (see also next example)
cpu_tv=findViewById(R.id.cpu_utilization); cpu_tv=findViewById(R.id.cpu_utilization);
core_tv=findViewById(R.id.core); core_tv=findViewById(R.id.core);
String lab_pc=lab+"-"+pc; String lab_pc=lab+"-"+pc;
...@@ -58,7 +91,24 @@ public class DetailActivity extends AppCompatActivity { ...@@ -58,7 +91,24 @@ public class DetailActivity extends AppCompatActivity {
fab_lab = findViewById(R.id.fab_lab_detail); fab_lab = findViewById(R.id.fab_lab_detail);
fab_keyboard = findViewById(R.id.fab_keyboard_detail); fab_keyboard = findViewById(R.id.fab_keyboard_detail);
fab_mouse = findViewById(R.id.fab_mouse_detail); fab_mouse = findViewById(R.id.fab_mouse_detail);
fab_search = findViewById(R.id.fab_search_detail); // fab_search = findViewById(R.id.fab_search_detail);
editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
closeFABMenu();
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
//after the change calling the method and passing the search input
filter(editable.toString());
}
});
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
...@@ -83,24 +133,45 @@ public class DetailActivity extends AppCompatActivity { ...@@ -83,24 +133,45 @@ public class DetailActivity extends AppCompatActivity {
} }
}); });
new GetHardwareDetails().execute(); new GetHardwareDetails().execute();
new GetSoftwares().execute();
} }
private void showFABMenu(){ private void showFABMenu(){
isFABOpen=true; isFABOpen=true;
fab.setImageResource(R.drawable.ic_fab_right); fab.setImageResource(R.drawable.ic_down);
fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65)); fab_lab.animate().translationY(-getResources().getDimension(R.dimen.standard_65));
fab_search.animate().translationX(-getResources().getDimension(R.dimen.standard_115)); // fab_search.animate().translationY(-getResources().getDimension(R.dimen.standard_115));
fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_165)); fab_keyboard.animate().translationY(-getResources().getDimension(R.dimen.standard_115));
fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_215)); fab_mouse.animate().translationY(-getResources().getDimension(R.dimen.standard_165));
} }
private void closeFABMenu(){ private void closeFABMenu(){
isFABOpen=false; isFABOpen=false;
fab.setImageResource(R.drawable.ic_fab_left); fab.setImageResource(R.drawable.ic_up);
fab_lab.animate().translationX(0); fab_lab.animate().translationY(0);
fab_search.animate().translationX(0); // fab_search.animate().translationY(0);
fab_keyboard.animate().translationX(0); fab_keyboard.animate().translationY(0);
fab_mouse.animate().translationX(0); fab_mouse.animate().translationY(0);
}
private void filter(String text) {
//new array list that will hold the filtered data
ArrayList<String> filterdNames = new ArrayList<>();
//looping through existing elements
for (String s : software) {
//if the existing elements contains the search input
if (s.toLowerCase().contains(text.toLowerCase())) {
//adding the element to filtered list
filterdNames.add(s);
}
}
//calling a method of the adapter class and passing the filtered list
mAdapter.filterList(filterdNames);
} }
private class GetDetails extends AsyncTask<Void, Void, Void> { private class GetDetails extends AsyncTask<Void, Void, Void> {
...@@ -293,6 +364,81 @@ public class DetailActivity extends AppCompatActivity { ...@@ -293,6 +364,81 @@ public class DetailActivity extends AppCompatActivity {
catch(Exception e){ catch(Exception e){
Log.e(TAG,e.getMessage()); Log.e(TAG,e.getMessage());
} }
}
}
private class GetSoftwares extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected Void doInBackground(Void... arg0) {
HttpHandler sh = new HttpHandler();
// Making a request to url and getting response
String url = "http://10.130.150.223:5000/lab/"+lab+"/"+pc+"/software";
String jsonStr = sh.makeServiceCall(url);
//Log.e(TAG, "Response from url: " + jsonStr);
if (jsonStr != null) {
try {
JSONObject jsonObj = new JSONObject(jsonStr);
JSONArray jsonArr=jsonObj.getJSONArray("installed");
for(int i=0;i<jsonArr.length();i++){
software.add(jsonArr.getString(i));
}
} catch (final JSONException e) {
Log.e(TAG, "Json parsing error: " + e.getMessage());
/* runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicatioContext(),
"Json parsing error: " + e.getMessage(),
Toast.LENGTH_LONG).show();
}
});
*/
}
} else {
Log.e(TAG, "Couldn't get json from server.");
/* runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),
"Couldn't get json from server. Check LogCat for possible errors!",
Toast.LENGTH_LONG).show();
}
});*/
}
return null;
}
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
/*int size=software.size();
String[] softArr=new String[size];
for(int i=0;i<size;i++){
softArr[i]=software.get(i);
}
*/
mAdapter = new SoftListAdapter(software);
recyclerView.setAdapter(mAdapter);
} }
} }
......
package com.example.labstatus;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
public class SoftListAdapter extends RecyclerView.Adapter<SoftListAdapter.MyViewHolder> {
private ArrayList<String> mDataset;
// Provide a reference to the views for each data item
// Complex data items may need more than one view per item, and
// you provide access to all the views for a data item in a view holder
public void filterList(ArrayList<String> filterdNames) {
this.mDataset = filterdNames;
notifyDataSetChanged();
}
public static class MyViewHolder extends RecyclerView.ViewHolder {
// each data item is just a string in this case
public TextView textView;
public MyViewHolder(TextView v) {
super(v);
textView = v;
}
}
// Provide a suitable constructor (depends on the kind of dataset)
public SoftListAdapter(ArrayList<String> myDataset) {
mDataset = myDataset;
}
// Create new views (invoked by the layout manager)
@Override
public SoftListAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent,
int viewType) {
// create a new view
TextView v = (TextView) LayoutInflater.from(parent.getContext())
.inflate(R.layout.list_item, parent, false);
MyViewHolder vh = new MyViewHolder(v);
return vh;
}
// Replace the contents of a view (invoked by the layout manager)
@Override
public void onBindViewHolder(MyViewHolder holder, int position) {
// - get element from your dataset at this position
// - replace the contents of the view with that element
holder.textView.setText(mDataset.get(position));
}
// Return the size of your dataset (invoked by the layout manager)
@Override
public int getItemCount() {
return mDataset.size();
}
//and assigning it to the list with notifydatasetchanged method
}
\ No newline at end of file
...@@ -27,6 +27,7 @@ import com.example.labstatus.HttpHandler; ...@@ -27,6 +27,7 @@ import com.example.labstatus.HttpHandler;
import com.example.labstatus.MainActivity; import com.example.labstatus.MainActivity;
import com.example.labstatus.R; import com.example.labstatus.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import org.json.JSONException; import org.json.JSONException;
...@@ -44,7 +45,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -44,7 +45,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
ProgressBar bar; ProgressBar bar;
View root; View root;
boolean isFABOpen=false; boolean isFABOpen=false;
FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab_search,fab; FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab;
public View onCreateView(@NonNull LayoutInflater inflater, public View onCreateView(@NonNull LayoutInflater inflater,
...@@ -70,7 +71,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -70,7 +71,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
fab_lab = root.findViewById(R.id.fab_lab_sl1); fab_lab = root.findViewById(R.id.fab_lab_sl1);
fab_keyboard = root.findViewById(R.id.fab_keyboard_sl1); fab_keyboard = root.findViewById(R.id.fab_keyboard_sl1);
fab_mouse = root.findViewById(R.id.fab_mouse_sl1); fab_mouse = root.findViewById(R.id.fab_mouse_sl1);
fab_search = root.findViewById(R.id.fab_search_sl1);
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
...@@ -88,7 +89,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -88,7 +89,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
fab_keyboard.setOnClickListener(new View.OnClickListener() { fab_keyboard.setOnClickListener(new View.OnClickListener() {
...@@ -98,7 +99,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -98,7 +99,7 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
fab_mouse.setOnClickListener(new View.OnClickListener() { fab_mouse.setOnClickListener(new View.OnClickListener() {
...@@ -108,20 +109,11 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -108,20 +109,11 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
}
});
fab_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
fab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
new GetLabStatus().execute(); new GetLabStatus().execute();
return root; return root;
...@@ -130,16 +122,16 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -130,16 +122,16 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
isFABOpen=true; isFABOpen=true;
fab.setImageResource(R.drawable.ic_fab_right); fab.setImageResource(R.drawable.ic_fab_right);
fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65)); fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65));
fab_search.animate().translationX(-getResources().getDimension(R.dimen.standard_115));
fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_165)); fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_115));
fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_215)); fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_165));
} }
private void closeFABMenu(){ private void closeFABMenu(){
isFABOpen=false; isFABOpen=false;
fab.setImageResource(R.drawable.ic_fab_left); fab.setImageResource(R.drawable.ic_fab_left);
fab_lab.animate().translationX(0); fab_lab.animate().translationX(0);
fab_search.animate().translationX(0);
fab_keyboard.animate().translationX(0); fab_keyboard.animate().translationX(0);
fab_mouse.animate().translationX(0); fab_mouse.animate().translationX(0);
} }
...@@ -149,8 +141,14 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL ...@@ -149,8 +141,14 @@ public class DashboardFragment extends Fragment implements RecyclerViewAdapterSL
Intent intent=new Intent(getActivity(), DetailActivity.class); Intent intent=new Intent(getActivity(), DetailActivity.class);
intent.putExtra("lab","sl1"); intent.putExtra("lab","sl1");
intent.putExtra("pc",item.text); intent.putExtra("pc",item.text);
if(status.get(SL1_ini+item.text)==false)
Snackbar.make(root, "System offline", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
else{
startActivity(intent); startActivity(intent);
} }
}
private class GetLabStatus extends AsyncTask<Void, Void, Void> { private class GetLabStatus extends AsyncTask<Void, Void, Void> {
......
...@@ -9,7 +9,6 @@ import android.view.LayoutInflater; ...@@ -9,7 +9,6 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
...@@ -25,6 +24,7 @@ import com.example.labstatus.HttpHandler; ...@@ -25,6 +24,7 @@ import com.example.labstatus.HttpHandler;
import com.example.labstatus.MainActivity; import com.example.labstatus.MainActivity;
import com.example.labstatus.R; import com.example.labstatus.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import org.json.JSONException; import org.json.JSONException;
...@@ -46,7 +46,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -46,7 +46,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
HashMap<String, Boolean> status=new HashMap<>(); HashMap<String, Boolean> status=new HashMap<>();
String SL2_ini="10.130.154."; String SL2_ini="10.130.154.";
boolean isFABOpen=false; boolean isFABOpen=false;
FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab_search,fab; FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab;
public View onCreateView(@NonNull LayoutInflater inflater, public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) { ViewGroup container, Bundle savedInstanceState) {
homeViewModel = ViewModelProviders.of(this).get(HomeViewModel.class); homeViewModel = ViewModelProviders.of(this).get(HomeViewModel.class);
...@@ -59,7 +59,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -59,7 +59,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
fab_lab = root.findViewById(R.id.fab_lab); fab_lab = root.findViewById(R.id.fab_lab);
fab_keyboard = root.findViewById(R.id.fab_keyboard); fab_keyboard = root.findViewById(R.id.fab_keyboard);
fab_mouse = root.findViewById(R.id.fab_mouse); fab_mouse = root.findViewById(R.id.fab_mouse);
fab_search = root.findViewById(R.id.fab_search);
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
...@@ -77,7 +77,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -77,7 +77,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
fab_keyboard.setOnClickListener(new View.OnClickListener() { fab_keyboard.setOnClickListener(new View.OnClickListener() {
...@@ -87,7 +87,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -87,7 +87,7 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
fab_mouse.setOnClickListener(new View.OnClickListener() { fab_mouse.setOnClickListener(new View.OnClickListener() {
...@@ -97,20 +97,10 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -97,20 +97,10 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
}
});
fab_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
fab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
arrayList = new ArrayList(); arrayList = new ArrayList();
new GetLabStatus().execute(); new GetLabStatus().execute();
...@@ -122,16 +112,16 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -122,16 +112,16 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
isFABOpen=true; isFABOpen=true;
fab.setImageResource(R.drawable.ic_fab_right); fab.setImageResource(R.drawable.ic_fab_right);
fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65)); fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65));
fab_search.animate().translationX(-getResources().getDimension(R.dimen.standard_115));
fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_165)); fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_115));
fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_215)); fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_165));
} }
private void closeFABMenu(){ private void closeFABMenu(){
isFABOpen=false; isFABOpen=false;
fab.setImageResource(R.drawable.ic_fab_left); fab.setImageResource(R.drawable.ic_fab_left);
fab_lab.animate().translationX(0); fab_lab.animate().translationX(0);
fab_search.animate().translationX(0);
fab_keyboard.animate().translationX(0); fab_keyboard.animate().translationX(0);
fab_mouse.animate().translationX(0); fab_mouse.animate().translationX(0);
} }
...@@ -142,9 +132,17 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite ...@@ -142,9 +132,17 @@ public class HomeFragment extends Fragment implements RecyclerViewAdapterSL2.Ite
Intent intent=new Intent(getActivity(), DetailActivity.class); Intent intent=new Intent(getActivity(), DetailActivity.class);
intent.putExtra("lab","sl2"); intent.putExtra("lab","sl2");
intent.putExtra("pc",item.text); intent.putExtra("pc",item.text);
if(status.get(SL2_ini+item.text)==false)
Snackbar.make(root, "System offline", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
else{
startActivity(intent); startActivity(intent);
} }
}
private class GetLabStatus extends AsyncTask<Void, Void, Void> { private class GetLabStatus extends AsyncTask<Void, Void, Void> {
......
...@@ -23,6 +23,7 @@ import com.example.labstatus.DetailActivity; ...@@ -23,6 +23,7 @@ import com.example.labstatus.DetailActivity;
import com.example.labstatus.HttpHandler; import com.example.labstatus.HttpHandler;
import com.example.labstatus.R; import com.example.labstatus.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import android.widget.Toast; import android.widget.Toast;
...@@ -45,7 +46,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -45,7 +46,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
HashMap<String, Boolean> status=new HashMap<>(); HashMap<String, Boolean> status=new HashMap<>();
String CS101_ini="10.130.152."; String CS101_ini="10.130.152.";
boolean isFABOpen=false; boolean isFABOpen=false;
FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab_search,fab; FloatingActionButton fab_lab,fab_keyboard,fab_mouse,fab;
public View onCreateView(@NonNull LayoutInflater inflater, public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) { ViewGroup container, Bundle savedInstanceState) {
...@@ -67,7 +68,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -67,7 +68,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
fab_lab = root.findViewById(R.id.fab_lab_cs101); fab_lab = root.findViewById(R.id.fab_lab_cs101);
fab_keyboard = root.findViewById(R.id.fab_keyboard_cs101); fab_keyboard = root.findViewById(R.id.fab_keyboard_cs101);
fab_mouse = root.findViewById(R.id.fab_mouse_cs101); fab_mouse = root.findViewById(R.id.fab_mouse_cs101);
fab_search = root.findViewById(R.id.fab_search_cs101);
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
...@@ -85,7 +86,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -85,7 +86,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); // fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
fab_keyboard.setOnClickListener(new View.OnClickListener() { fab_keyboard.setOnClickListener(new View.OnClickListener() {
...@@ -95,7 +96,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -95,7 +96,7 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); // fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
fab_mouse.setOnClickListener(new View.OnClickListener() { fab_mouse.setOnClickListener(new View.OnClickListener() {
...@@ -105,20 +106,11 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -105,20 +106,11 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark))); fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent))); // fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
}
});
fab_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
fab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_search.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimaryDark)));
fab_keyboard.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_mouse.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
fab_lab.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorAccent)));
} }
}); });
new GetLabStatus().execute(); new GetLabStatus().execute();
return root; return root;
...@@ -127,16 +119,17 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -127,16 +119,17 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
isFABOpen=true; isFABOpen=true;
fab.setImageResource(R.drawable.ic_fab_right); fab.setImageResource(R.drawable.ic_fab_right);
fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65)); fab_lab.animate().translationX(-getResources().getDimension(R.dimen.standard_65));
fab_search.animate().translationX(-getResources().getDimension(R.dimen.standard_115));
fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_165));
fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_215)); fab_keyboard.animate().translationX(-getResources().getDimension(R.dimen.standard_115));
fab_mouse.animate().translationX(-getResources().getDimension(R.dimen.standard_165));
} }
private void closeFABMenu(){ private void closeFABMenu(){
isFABOpen=false; isFABOpen=false;
fab.setImageResource(R.drawable.ic_fab_left); fab.setImageResource(R.drawable.ic_fab_left);
fab_lab.animate().translationX(0); fab_lab.animate().translationX(0);
fab_search.animate().translationX(0);
fab_keyboard.animate().translationX(0); fab_keyboard.animate().translationX(0);
fab_mouse.animate().translationX(0); fab_mouse.animate().translationX(0);
} }
...@@ -147,8 +140,14 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt ...@@ -147,8 +140,14 @@ public class NotificationsFragment extends Fragment implements RecyclerViewAdapt
Intent intent=new Intent(getActivity(), DetailActivity.class); Intent intent=new Intent(getActivity(), DetailActivity.class);
intent.putExtra("lab","cs101"); intent.putExtra("lab","cs101");
intent.putExtra("pc",item.text); intent.putExtra("pc",item.text);
if(status.get(CS101_ini+item.text)==false)
Snackbar.make(root, "System offline", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
else{
startActivity(intent); startActivity(intent);
} }
}
private class GetLabStatus extends AsyncTask<Void, Void, Void> { private class GetLabStatus extends AsyncTask<Void, Void, Void> {
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="#FF000000"
android:pathData="M7,10l5,5 5,-5z"/>
</vector>
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
android:alpha="0.8"> android:alpha="0.8">
<path <path
android:fillColor="#FF000000" android:fillColor="#FF000000"
android:pathData="M20,18c1.1,0 1.99,-0.9 1.99,-2L22,6c0,-1.1 -0.9,-2 -2,-2H4c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2H0v2h24v-2h-4zM4,6h16v10H4V6z"/> android:pathData="M7,24h2v-2L7,22v2zM11,24h2v-2h-2v2zM13,2h-2v10h2L13,2zM16.56,4.44l-1.45,1.45C16.84,6.94 18,8.83 18,11c0,3.31 -2.69,6 -6,6s-6,-2.69 -6,-6c0,-2.17 1.16,-4.06 2.88,-5.12L7.44,4.44C5.36,5.88 4,8.28 4,11c0,4.42 3.58,8 8,8s8,-3.58 8,-8c0,-2.72 -1.36,-5.12 -3.44,-6.56zM15,24h2v-2h-2v2z"/>
</vector> </vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#D81B60"
android:alpha="0.8">
<path
android:fillColor="#FF000000"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="#FF000000"
android:pathData="M7,14l5,-5 5,5z"/>
</vector>
...@@ -78,8 +78,7 @@ ...@@ -78,8 +78,7 @@
app:fabCustomSize="45dp" app:fabCustomSize="45dp"
android:layout_margin="@dimen/fab_margin" android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/app_bar" android:layout_gravity="bottom|end"
app:layout_anchorGravity="bottom|end"
android:src="@drawable/ic_keyboard"/> android:src="@drawable/ic_keyboard"/>
...@@ -91,8 +90,7 @@ ...@@ -91,8 +90,7 @@
app:fabCustomSize="45dp" app:fabCustomSize="45dp"
android:layout_margin="@dimen/fab_margin" android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/app_bar" android:layout_gravity="bottom|end"
app:layout_anchorGravity="bottom|end"
android:src="@drawable/ic_mouse"/> android:src="@drawable/ic_mouse"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
...@@ -103,30 +101,19 @@ ...@@ -103,30 +101,19 @@
app:fabCustomSize="45dp" app:fabCustomSize="45dp"
android:layout_margin="@dimen/fab_margin" android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/app_bar" android:layout_gravity="bottom|end"
app:layout_anchorGravity="bottom|end"
android:src="@drawable/ic_lab" /> android:src="@drawable/ic_lab" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fab_search_detail"
android:layout_width="45dp"
android:layout_height="45dp"
app:fabCustomSize="45dp"
android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/app_bar"
app:layout_anchorGravity="bottom|end"
android:src="@drawable/ic_search" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_detail" android:id="@+id/fab_detail"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin" android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@id/app_bar" android:layout_gravity="bottom|end"
app:layout_anchorGravity="bottom|end"
android:src="@drawable/ic_fab_left" /> android:src="@drawable/ic_up" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
...@@ -3,15 +3,43 @@ ...@@ -3,15 +3,43 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:scrollbars="none"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".DetailActivity" tools:context=".DetailActivity"
tools:showIn="@layout/activity_detail"> tools:showIn="@layout/activity_detail">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/textViewLstHead"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin" android:layout_margin="@dimen/text_margin"
android:text="@string/large_text" /> android:textColor="@android:color/black"
android:textSize="20sp"
android:textStyle="bold"
android:text="List of Softwares Installed"
/>
<EditText
android:id="@+id/soft_search"
android:layout_width="match_parent"
android:layout_margin="@dimen/text_margin"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="Enter search term"
android:drawableRight="@drawable/ic_search_violet"
android:autofillHints="" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/my_recycler_view_lst"
android:scrollbars="none"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
\ No newline at end of file
...@@ -64,18 +64,7 @@ ...@@ -64,18 +64,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:src="@drawable/ic_lab" /> android:src="@drawable/ic_lab" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fab_search_sl1"
android:layout_width="45dp"
android:layout_height="45dp"
app:fabCustomSize="45dp"
android:layout_gravity="bottom|end"
android:layout_marginBottom="70dp"
android:layout_marginRight="20dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_search" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_sl1" android:id="@+id/fab_sl1"
......
...@@ -64,18 +64,7 @@ ...@@ -64,18 +64,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:src="@drawable/ic_lab" /> android:src="@drawable/ic_lab" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fab_search"
android:layout_width="45dp"
android:layout_height="45dp"
app:fabCustomSize="45dp"
android:layout_gravity="bottom|end"
android:layout_marginBottom="70dp"
android:layout_marginRight="20dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_search" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
......
...@@ -65,18 +65,7 @@ ...@@ -65,18 +65,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:src="@drawable/ic_lab" /> android:src="@drawable/ic_lab" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fab_search_cs101"
android:layout_width="45dp"
android:layout_height="45dp"
app:fabCustomSize="45dp"
android:layout_gravity="bottom|end"
android:layout_marginBottom="70dp"
android:layout_marginRight="20dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_search" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_cs101" android:id="@+id/fab_cs101"
......
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textViewLst"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textColor="@android:color/black"
/>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment