Commit 228bd848 authored by Varun Patil's avatar Varun Patil

Merge branch 'master' into moremisc

parents 3b8d2853 34c61c45
...@@ -68,7 +68,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -68,7 +68,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
session = new SessionManager(getApplicationContext()); session = new SessionManager(getApplicationContext());
session.checkLogin(); session.checkLogin();
Toast.makeText(getApplicationContext(), "Log In status: " + session.isLoggedIn(), Toast.LENGTH_LONG).show();
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
...@@ -121,7 +120,11 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -121,7 +120,11 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
nameTextView.setText(currentUser.getUserName()); nameTextView.setText(currentUser.getUserName());
rollNoTextView.setText(currentUser.getUserRollNumber()); rollNoTextView.setText(currentUser.getUserRollNumber());
Picasso.with(this).load(currentUser.getUserProfilePictureUrl()).into(profilePictureImageView); Picasso.with(this)
.load(currentUser.getUserProfilePictureUrl())
.resize(200, 0)
.placeholder(R.drawable.user_placeholder)
.into(profilePictureImageView);
} }
// private void fetchNotifications() { // private void fetchNotifications() {
...@@ -262,6 +265,8 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -262,6 +265,8 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
bundle.putString(Constants.SESSION_ID, session.pref.getString(Constants.SESSION_ID, "Error")); bundle.putString(Constants.SESSION_ID, session.pref.getString(Constants.SESSION_ID, "Error"));
if (fragment instanceof MessMenuFragment) if (fragment instanceof MessMenuFragment)
bundle.putString(Constants.USER_HOSTEL, currentUser.getHostel()); bundle.putString(Constants.USER_HOSTEL, currentUser.getHostel());
if (fragment instanceof SettingsFragment && session.isLoggedIn())
bundle.putString(Constants.USER_ID, currentUser.getUserID());
fragment.setArguments(bundle); fragment.setArguments(bundle);
FragmentManager manager = getSupportFragmentManager(); FragmentManager manager = getSupportFragmentManager();
if (fragment instanceof FeedFragment) if (fragment instanceof FeedFragment)
......
...@@ -17,7 +17,6 @@ public class SessionManager { ...@@ -17,7 +17,6 @@ public class SessionManager {
public SessionManager(Context context) { public SessionManager(Context context) {
this.context = context; this.context = context;
pref = context.getSharedPreferences(Constants.PREF_NAME, PRIVATE_MODE); pref = context.getSharedPreferences(Constants.PREF_NAME, PRIVATE_MODE);
editor = pref.edit();
} }
public void checkLogin() { public void checkLogin() {
...@@ -34,6 +33,7 @@ public class SessionManager { ...@@ -34,6 +33,7 @@ public class SessionManager {
public void createLoginSession(String gcmId, User currentUser, String sessionID) { public void createLoginSession(String gcmId, User currentUser, String sessionID) {
Log.d("SessionManager", "GcmId being stored"); Log.d("SessionManager", "GcmId being stored");
editor = pref.edit();
editor.putBoolean(Constants.IS_LOGGED_IN, true); editor.putBoolean(Constants.IS_LOGGED_IN, true);
editor.putString(Constants.GCM_ID, gcmId); editor.putString(Constants.GCM_ID, gcmId);
editor.putString(Constants.CURRENT_USER, currentUser.toString()); editor.putString(Constants.CURRENT_USER, currentUser.toString());
...@@ -48,4 +48,9 @@ public class SessionManager { ...@@ -48,4 +48,9 @@ public class SessionManager {
public boolean isLoggedIn() { public boolean isLoggedIn() {
return pref.getBoolean(Constants.IS_LOGGED_IN, false); return pref.getBoolean(Constants.IS_LOGGED_IN, false);
} }
public void logout() {
editor = pref.edit();
editor.clear().commit();
}
} }
...@@ -49,7 +49,11 @@ public class UserAdapter extends RecyclerView.Adapter<UserAdapter.ViewHolder> { ...@@ -49,7 +49,11 @@ public class UserAdapter extends RecyclerView.Adapter<UserAdapter.ViewHolder> {
User user = userList.get(position); User user = userList.get(position);
holder.userName.setText(user.getUserName()); holder.userName.setText(user.getUserName());
holder.role.setText(user.getCurrentRole()); holder.role.setText(user.getCurrentRole());
Picasso.with(context).load(user.getUserProfilePictureUrl()).resize(120, 0).into(holder.image); Picasso.with(context)
.load(user.getUserProfilePictureUrl())
.resize(150, 0)
.placeholder(R.drawable.user_placeholder)
.into(holder.image);
} }
......
...@@ -61,6 +61,9 @@ public interface RetrofitInterface { ...@@ -61,6 +61,9 @@ public interface RetrofitInterface {
@GET("news") @GET("news")
Call<List<NewsArticle>> getNews(@Header("Cookie") String sessionID); Call<List<NewsArticle>> getNews(@Header("Cookie") String sessionID);
@GET("logout")
Call<Void> logout(@Header("Cookie") String sessionID);
// @POST("getNotifications/") // @POST("getNotifications/")
// Call<NotificationsResponse> getNotifications(@Body NotificationsRequest notificationsRequest); // Call<NotificationsResponse> getNotifications(@Body NotificationsRequest notificationsRequest);
} }
...@@ -6,13 +6,17 @@ import android.app.ProgressDialog; ...@@ -6,13 +6,17 @@ import android.app.ProgressDialog;
import android.app.TimePickerDialog; import android.app.TimePickerDialog;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v4.widget.ImageViewCompat; import android.support.v4.widget.ImageViewCompat;
import android.util.Base64; import android.util.Base64;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -98,6 +102,17 @@ public class AddEventFragment extends BaseFragment { ...@@ -98,6 +102,17 @@ public class AddEventFragment extends BaseFragment {
// Required empty public constructor // Required empty public constructor
} }
public static String convertImageToString(Bitmap imageBitmap) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
if (imageBitmap != null) {
imageBitmap.compress(Bitmap.CompressFormat.JPEG, 60, stream);
byte[] byteArray = stream.toByteArray();
return Base64.encodeToString(byteArray, Base64.DEFAULT);
} else {
return null;
}
}
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
...@@ -288,8 +303,52 @@ public class AddEventFragment extends BaseFragment { ...@@ -288,8 +303,52 @@ public class AddEventFragment extends BaseFragment {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) { if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {
Uri selectedImage = data.getData(); Uri selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getActivity().getContentResolver().query(selectedImage, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String picturePath = cursor.getString(columnIndex);
cursor.close();
ImageViewCompat.setImageTintList(eventPictureImageView, null); ImageViewCompat.setImageTintList(eventPictureImageView, null);
Picasso.with(getContext()).load(selectedImage).into(eventPictureImageView); Picasso.with(getContext()).load(selectedImage).into(eventPictureImageView);
base64Image = convertImageToString(getScaledBitmap(picturePath, 800, 800));
Log.d(TAG, "onActivityResult: " + base64Image);
}
}
private Bitmap getScaledBitmap(String picturePath, int width, int height) {
BitmapFactory.Options sizeOptions = new BitmapFactory.Options();
sizeOptions.inJustDecodeBounds = true;
BitmapFactory.decodeFile(picturePath, sizeOptions);
int inSampleSize = calculateInSampleSize(sizeOptions, width, height);
sizeOptions.inJustDecodeBounds = false;
sizeOptions.inSampleSize = inSampleSize;
return BitmapFactory.decodeFile(picturePath, sizeOptions);
}
private int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {
// Raw height and width of image
final int height = options.outHeight;
final int width = options.outWidth;
int inSampleSize = 1;
if (height > reqHeight || width > reqWidth) {
// Calculate ratios of height and width to requested height and
// width
final int heightRatio = Math.round((float) height / (float) reqHeight);
final int widthRatio = Math.round((float) width / (float) reqWidth);
// Choose the smallest ratio as inSampleSize value, this will
// guarantee
// a final image with both dimensions larger than or equal to the
// requested height and width.
inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
} }
return inSampleSize;
} }
} }
...@@ -291,6 +291,8 @@ public class BodyFragment extends Fragment { ...@@ -291,6 +291,8 @@ public class BodyFragment extends Fragment {
}); });
childrenRecyclerView.setAdapter(childrenAdapter); childrenRecyclerView.setAdapter(childrenAdapter);
childrenRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); childrenRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
/** /**
......
...@@ -74,6 +74,7 @@ public class BodyRecyclerViewFragment extends Fragment { ...@@ -74,6 +74,7 @@ public class BodyRecyclerViewFragment extends Fragment {
arguments.putString(Constants.BODY_JSON, new Gson().toJson(body)); arguments.putString(Constants.BODY_JSON, new Gson().toJson(body));
bodyFragment.setArguments(getArguments()); bodyFragment.setArguments(getArguments());
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right);
ft.replace(R.id.framelayout_for_fragment, bodyFragment, bodyFragment.getTag()); ft.replace(R.id.framelayout_for_fragment, bodyFragment, bodyFragment.getTag());
ft.addToBackStack(bodyFragment.getTag()); ft.addToBackStack(bodyFragment.getTag());
ft.commit(); ft.commit();
......
...@@ -173,6 +173,8 @@ public class CalendarFragment extends BaseFragment { ...@@ -173,6 +173,8 @@ public class CalendarFragment extends BaseFragment {
}); });
eventRecyclerView.setAdapter(eventAdapter); eventRecyclerView.setAdapter(eventAdapter);
eventRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); eventRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
} }
...@@ -72,6 +72,7 @@ public class EventRecyclerViewFragment extends Fragment { ...@@ -72,6 +72,7 @@ public class EventRecyclerViewFragment extends Fragment {
arguments.putString(Constants.EVENT_JSON, new Gson().toJson(event)); arguments.putString(Constants.EVENT_JSON, new Gson().toJson(event));
eventFragment.setArguments(getArguments()); eventFragment.setArguments(getArguments());
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right);
ft.replace(R.id.framelayout_for_fragment, eventFragment, eventFragment.getTag()); ft.replace(R.id.framelayout_for_fragment, eventFragment, eventFragment.getTag());
ft.addToBackStack(eventFragment.getTag()); ft.addToBackStack(eventFragment.getTag());
ft.commit(); ft.commit();
......
...@@ -144,6 +144,7 @@ public class FeedFragment extends BaseFragment { ...@@ -144,6 +144,7 @@ public class FeedFragment extends BaseFragment {
} }
} }
}); });
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
private class updateDatabase extends AsyncTask<List<Event>, Void, Integer> { private class updateDatabase extends AsyncTask<List<Event>, Void, Integer> {
......
...@@ -169,6 +169,7 @@ public class MessMenuFragment extends BaseFragment { ...@@ -169,6 +169,7 @@ public class MessMenuFragment extends BaseFragment {
} }
} }
}); });
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
private class updateDatabase extends AsyncTask<List<HostelMessMenu>, Void, Integer> { private class updateDatabase extends AsyncTask<List<HostelMessMenu>, Void, Integer> {
......
...@@ -110,6 +110,7 @@ public class NewsFragment extends BaseFragment { ...@@ -110,6 +110,7 @@ public class NewsFragment extends BaseFragment {
} }
} }
}); });
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
private void openWebURL(String URL) { private void openWebURL(String URL) {
......
...@@ -111,6 +111,7 @@ public class PlacementBlogFragment extends BaseFragment { ...@@ -111,6 +111,7 @@ public class PlacementBlogFragment extends BaseFragment {
} }
} }
}); });
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
private void openWebURL(String URL) { private void openWebURL(String URL) {
......
...@@ -81,6 +81,9 @@ public class ProfileFragment extends BaseFragment { ...@@ -81,6 +81,9 @@ public class ProfileFragment extends BaseFragment {
TextView userEmailIDTextView = getActivity().findViewById(R.id.user_email_profile); TextView userEmailIDTextView = getActivity().findViewById(R.id.user_email_profile);
TextView userContactNumberTextView = getActivity().findViewById(R.id.user_contact_no_profile); TextView userContactNumberTextView = getActivity().findViewById(R.id.user_contact_no_profile);
/** Show tabs */
getActivity().findViewById(R.id.tab_layout).setVisibility(View.VISIBLE);
final List<Role> roleList = user.getUserRoles(); final List<Role> roleList = user.getUserRoles();
RecyclerView userRoleRecyclerView = getActivity().findViewById(R.id.role_recycler_view); RecyclerView userRoleRecyclerView = getActivity().findViewById(R.id.role_recycler_view);
RoleAdapter roleAdapter = new RoleAdapter(roleList, new ItemClickListener() { RoleAdapter roleAdapter = new RoleAdapter(roleList, new ItemClickListener() {
...@@ -90,6 +93,7 @@ public class ProfileFragment extends BaseFragment { ...@@ -90,6 +93,7 @@ public class ProfileFragment extends BaseFragment {
Body roleBody = role.getRoleBodyDetails(); Body roleBody = role.getRoleBodyDetails();
BodyFragment bodyFragment = BodyFragment.newInstance(roleBody); BodyFragment bodyFragment = BodyFragment.newInstance(roleBody);
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right);
ft.replace(R.id.framelayout_for_fragment, bodyFragment, bodyFragment.getTag()); ft.replace(R.id.framelayout_for_fragment, bodyFragment, bodyFragment.getTag());
ft.addToBackStack(bodyFragment.getTag()); ft.addToBackStack(bodyFragment.getTag());
ft.commit(); ft.commit();
...@@ -99,7 +103,11 @@ public class ProfileFragment extends BaseFragment { ...@@ -99,7 +103,11 @@ public class ProfileFragment extends BaseFragment {
userRoleRecyclerView.setAdapter(roleAdapter); userRoleRecyclerView.setAdapter(roleAdapter);
userRoleRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); userRoleRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
Picasso.with(getContext()).load(user.getUserProfilePictureUrl()).into(userProfilePictureImageView); Picasso.with(getContext())
.load(user.getUserProfilePictureUrl())
.resize(800, 0)
.placeholder(R.drawable.user_placeholder)
.into(userProfilePictureImageView);
final List<Body> bodyList = user.getUserFollowedBodies(); final List<Body> bodyList = user.getUserFollowedBodies();
final List<Event> eventList = user.getUserGoingEvents(); final List<Event> eventList = user.getUserGoingEvents();
...@@ -123,6 +131,8 @@ public class ProfileFragment extends BaseFragment { ...@@ -123,6 +131,8 @@ public class ProfileFragment extends BaseFragment {
userRollNumberTextView.setText(user.getUserRollNumber()); userRollNumberTextView.setText(user.getUserRollNumber());
userEmailIDTextView.setText(user.getUserEmail()); userEmailIDTextView.setText(user.getUserEmail());
userContactNumberTextView.setText(user.getUserContactNumber()); userContactNumberTextView.setText(user.getUserContactNumber());
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
......
package in.ac.iitb.gymkhana.iitbapp.fragment; package in.ac.iitb.gymkhana.iitbapp.fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.squareup.picasso.Picasso;
import in.ac.iitb.gymkhana.iitbapp.Constants;
import in.ac.iitb.gymkhana.iitbapp.LoginActivity;
import in.ac.iitb.gymkhana.iitbapp.R; import in.ac.iitb.gymkhana.iitbapp.R;
import in.ac.iitb.gymkhana.iitbapp.SessionManager;
import in.ac.iitb.gymkhana.iitbapp.api.RetrofitInterface;
import in.ac.iitb.gymkhana.iitbapp.api.ServiceGenerator;
import in.ac.iitb.gymkhana.iitbapp.data.User;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
* Use the {@link SettingsFragment#newInstance} factory method to
* create an instance of this fragment.
*/ */
public class SettingsFragment extends Fragment { public class SettingsFragment extends Fragment {
User user;
public SettingsFragment() { public SettingsFragment() {
// Required empty public constructor // Required empty public constructor
} }
public static SettingsFragment newInstance(String param1, String param2) { @Override
SettingsFragment fragment = new SettingsFragment(); public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle args = new Bundle(); Bundle savedInstanceState) {
fragment.setArguments(args); // Inflate the layout for this fragment
return fragment; return inflater.inflate(R.layout.fragment_settings, container, false);
} }
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onStart() {
super.onCreate(savedInstanceState); super.onStart();
Bundle bundle = getArguments();
String userID = bundle.getString(Constants.USER_ID);
RetrofitInterface retrofitInterface = ServiceGenerator.createService(RetrofitInterface.class);
retrofitInterface.getUser("sessionid=" + getArguments().getString(Constants.SESSION_ID), userID).enqueue(new Callback<User>() {
@Override
public void onResponse(Call<User> call, Response<User> response) {
if (response.isSuccessful()) {
user = response.body();
populateViews();
}
} }
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public void onFailure(Call<User> call, Throwable t) {
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_settings, container, false);
} }
});
}
private void populateViews() {
ImageView userProfilePictureImageView = getActivity().findViewById(R.id.user_card_avatar);
TextView userNameTextView = getActivity().findViewById(R.id.user_card_name);
Picasso.with(getContext()).load(user.getUserProfilePictureUrl()).into(userProfilePictureImageView);
userNameTextView.setText(user.getUserName());
Button updateProfileButton = getActivity().findViewById(R.id.settings_update_profile);
Button feedbackButton = getActivity().findViewById(R.id.settings_feedback);
Button aboutButton = getActivity().findViewById(R.id.settings_about);
Button logoutButton = getActivity().findViewById(R.id.settings_logout);
updateProfileButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openWebURL("https://gymkhana.iitb.ac.in/sso/user");
}
});
feedbackButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openWebURL("https://insti.app/feedback");
}
});
aboutButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AboutFragment aboutFragment = new AboutFragment();
FragmentManager manager = getActivity().getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right);
transaction.replace(R.id.framelayout_for_fragment, aboutFragment, aboutFragment.getTag());
transaction.addToBackStack(aboutFragment.getTag()).commit();
}
});
logoutButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RetrofitInterface retrofitInterface = ServiceGenerator.createService(RetrofitInterface.class);
retrofitInterface.logout("sessionid=" + getArguments().getString(Constants.SESSION_ID)).enqueue(new Callback<Void>() {
@Override
public void onResponse(Call<Void> call, Response<Void> response) {
if (response.isSuccessful()) {
SessionManager sessionManager = new SessionManager(getContext());
sessionManager.logout();
Intent intent = new Intent(getContext(), LoginActivity.class);
startActivity(intent);
getActivity().finish();
}
//Server Error
}
@Override
public void onFailure(Call<Void> call, Throwable t) {
//Network Error
}
});
}
});
}
private void openWebURL(String URL) {
Intent browse = new Intent(Intent.ACTION_VIEW, Uri.parse(URL));
startActivity(browse);
}
} }
...@@ -111,6 +111,7 @@ public class TrainingBlogFragment extends BaseFragment { ...@@ -111,6 +111,7 @@ public class TrainingBlogFragment extends BaseFragment {
} }
} }
}); });
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
private void openWebURL(String URL) { private void openWebURL(String URL) {
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM13,14h-2v-2h2v2zM13,10h-2L11,6h2v4z"/>
</vector>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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