Merge branch 'master' of github.com:sagidayan/TheSocialNotework-Android
This commit is contained in:
commit
f7abe47671
7 changed files with 370 additions and 102 deletions
|
@ -21,8 +21,10 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -65,6 +67,27 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
||||||
private MainActivity mainActivity;
|
private MainActivity mainActivity;
|
||||||
private final int MAX_ZOOM = 16, MIN_ZOOM = 9, DEFAULT_ZOOM = 12;
|
private final int MAX_ZOOM = 16, MIN_ZOOM = 9, DEFAULT_ZOOM = 12;
|
||||||
private HashMap<Marker, Note> eventMarkerMap;
|
private HashMap<Marker, Note> eventMarkerMap;
|
||||||
|
private ImageButton dateFilter;
|
||||||
|
private ImageButton locationFilter;
|
||||||
|
private ImageButton userFilter;
|
||||||
|
private Button map_small_filter;
|
||||||
|
private Button map_medium_filter;
|
||||||
|
private Button map_large_filter;
|
||||||
|
private LinearLayout mapFilters;
|
||||||
|
private boolean dateFilterIsVisible = false;
|
||||||
|
private boolean locationFilterIsVisible = false;
|
||||||
|
private boolean userFilterIsVisible = false;
|
||||||
|
|
||||||
|
private final String day = "24 hours";
|
||||||
|
private final String week = "Week";
|
||||||
|
private final String month = "Month";
|
||||||
|
private final String hundredMeters = "100 meters";
|
||||||
|
private final String kilometer = "1 Km";
|
||||||
|
private final String threeKilometer = "3 Km";
|
||||||
|
private final String mine = "mine";
|
||||||
|
private final String everyoneButMine = "all w/o me";
|
||||||
|
private final String everyone = "everyone's";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public GmapFragment() {
|
public GmapFragment() {
|
||||||
|
@ -89,7 +112,6 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mainActivity = (MainActivity) getActivity();
|
mainActivity = (MainActivity) getActivity();
|
||||||
|
|
||||||
gpsUtils = mainActivity.getGPSUtils();
|
gpsUtils = mainActivity.getGPSUtils();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -98,6 +120,8 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_personal, container, false);
|
||||||
|
|
||||||
return inflater.inflate(R.layout.fragment_gmap, container, false);
|
return inflater.inflate(R.layout.fragment_gmap, container, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +130,76 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
SupportMapFragment frag = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.mapFragment);
|
SupportMapFragment frag = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.mapFragment);
|
||||||
frag.getMapAsync(this);
|
frag.getMapAsync(this);
|
||||||
|
|
||||||
|
dateFilter = (ImageButton) view.findViewById(R.id.map_date_filter);
|
||||||
|
locationFilter = (ImageButton) view.findViewById(R.id.map_location_filter);
|
||||||
|
userFilter = (ImageButton) view.findViewById(R.id.map_user_filter);
|
||||||
|
|
||||||
|
map_small_filter = (Button) view.findViewById(R.id.map_small_filter);
|
||||||
|
map_medium_filter = (Button) view.findViewById(R.id.map_medium_filter);
|
||||||
|
map_large_filter = (Button) view.findViewById(R.id.map_large_filter);
|
||||||
|
|
||||||
|
mapFilters = (LinearLayout) view.findViewById(R.id.map_filter_options);
|
||||||
|
|
||||||
|
dateFilter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (dateFilterIsVisible) {
|
||||||
|
dateFilterIsVisible = false;
|
||||||
|
mapFilters.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
mapFilters.setVisibility(View.VISIBLE);
|
||||||
|
dateFilterIsVisible = true;
|
||||||
|
locationFilterIsVisible = false;
|
||||||
|
userFilterIsVisible = false;
|
||||||
|
|
||||||
|
// set text button in the right filter string
|
||||||
|
map_small_filter.setText(day);
|
||||||
|
map_medium_filter.setText(week);
|
||||||
|
map_large_filter.setText(month);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
locationFilter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (locationFilterIsVisible) {
|
||||||
|
locationFilterIsVisible = false;
|
||||||
|
mapFilters.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
mapFilters.setVisibility(View.VISIBLE);
|
||||||
|
locationFilterIsVisible = true;
|
||||||
|
dateFilterIsVisible = false;
|
||||||
|
userFilterIsVisible = false;
|
||||||
|
|
||||||
|
// set text button in the right filter string
|
||||||
|
map_small_filter.setText(hundredMeters);
|
||||||
|
map_medium_filter.setText(kilometer);
|
||||||
|
map_large_filter.setText(threeKilometer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
userFilter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (userFilterIsVisible) {
|
||||||
|
userFilterIsVisible = false;
|
||||||
|
mapFilters.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
mapFilters.setVisibility(View.VISIBLE);
|
||||||
|
userFilterIsVisible = true;
|
||||||
|
dateFilterIsVisible = false;
|
||||||
|
locationFilterIsVisible = false;
|
||||||
|
|
||||||
|
// set text button in the right filter string
|
||||||
|
map_small_filter.setText(mine);
|
||||||
|
map_medium_filter.setText(everyoneButMine);
|
||||||
|
map_large_filter.setText(everyone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +256,6 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GoogleMap.InfoWindowAdapter infoWindowAdapter = new GoogleMap.InfoWindowAdapter() { // Use default InfoWindow frame
|
GoogleMap.InfoWindowAdapter infoWindowAdapter = new GoogleMap.InfoWindowAdapter() { // Use default InfoWindow frame
|
||||||
@Override
|
@Override
|
||||||
public View getInfoWindow(Marker args) {
|
public View getInfoWindow(Marker args) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.Switch;
|
import android.widget.Switch;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -62,9 +63,25 @@ public class PersonalFragment extends Fragment {
|
||||||
private final int FINE_PERM = 0, CAMERA_PERM = 1;
|
private final int FINE_PERM = 0, CAMERA_PERM = 1;
|
||||||
|
|
||||||
|
|
||||||
public PersonalFragment() {
|
private ImageButton dateFilter;
|
||||||
// Required empty public constructor
|
private ImageButton userFilter;
|
||||||
}
|
private Button map_small_filter;
|
||||||
|
private Button map_medium_filter;
|
||||||
|
private Button map_large_filter;
|
||||||
|
private LinearLayout personalSpaceFilters;
|
||||||
|
private boolean dateFilterIsVisible = false;
|
||||||
|
private boolean userFilterIsVisible = false;
|
||||||
|
|
||||||
|
private final String day = "24 hours";
|
||||||
|
private final String week = "Week";
|
||||||
|
private final String month = "Month";
|
||||||
|
private final String privateNote = "Private";
|
||||||
|
private final String publicNote = "Public";
|
||||||
|
private final String privateAndPublic = "All";
|
||||||
|
|
||||||
|
public PersonalFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -93,23 +110,73 @@ public class PersonalFragment extends Fragment {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
this.noteList = (ListView) view.findViewById(R.id.ps_list_listview);
|
this.noteList = (ListView) view.findViewById(R.id.ps_list_listview);
|
||||||
gpsUtils = activity.getGPSUtils();
|
gpsUtils = activity.getGPSUtils();
|
||||||
gpsUtils.getLocation();
|
gpsUtils.getLocation();
|
||||||
listOfNotes = new ArrayList<>();
|
listOfNotes = new ArrayList<>();
|
||||||
noteListAdapter = new ListAdapter(getContext(), listOfNotes);
|
noteListAdapter = new ListAdapter(getContext(), listOfNotes);
|
||||||
noteList.setAdapter(noteListAdapter);
|
noteList.setAdapter(noteListAdapter);
|
||||||
noteList.setOnItemClickListener(new ItemClickedListener());
|
noteList.setOnItemClickListener(new ItemClickedListener());
|
||||||
Utils.showLoadingDialog(getActivity(), "Fetching..", "getting your notes");
|
Utils.showLoadingDialog(getActivity(), "Fetching..", "getting your notes");
|
||||||
getAllNotes();
|
|
||||||
|
dateFilter = (ImageButton) view.findViewById(R.id.personalSpace_date_filter);
|
||||||
|
userFilter = (ImageButton) view.findViewById(R.id.personalSpace_premission_filter);
|
||||||
|
|
||||||
|
map_small_filter = (Button) view.findViewById(R.id.personalSpace_small_filter);
|
||||||
|
map_medium_filter = (Button) view.findViewById(R.id.personalSpace_medium_filter);
|
||||||
|
map_large_filter = (Button) view.findViewById(R.id.personalSpace_large_filter);
|
||||||
|
|
||||||
|
personalSpaceFilters = (LinearLayout) view.findViewById(R.id.personalSpace_filter_options);
|
||||||
|
|
||||||
|
dateFilter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (dateFilterIsVisible) {
|
||||||
|
dateFilterIsVisible = false;
|
||||||
|
personalSpaceFilters.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
personalSpaceFilters.setVisibility(View.VISIBLE);
|
||||||
|
dateFilterIsVisible = true;
|
||||||
|
userFilterIsVisible = false;
|
||||||
|
|
||||||
|
// set text button in the right filter string
|
||||||
|
map_small_filter.setText(day);
|
||||||
|
map_medium_filter.setText(week);
|
||||||
|
map_large_filter.setText(month);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
userFilter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (userFilterIsVisible) {
|
||||||
|
userFilterIsVisible = false;
|
||||||
|
personalSpaceFilters.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
personalSpaceFilters.setVisibility(View.VISIBLE);
|
||||||
|
userFilterIsVisible = true;
|
||||||
|
dateFilterIsVisible = false;
|
||||||
|
|
||||||
|
// set text button in the right filter string
|
||||||
|
map_small_filter.setText(privateNote);
|
||||||
|
map_medium_filter.setText(publicNote);
|
||||||
|
map_large_filter.setText(privateAndPublic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// get all notes according to some default filter ? // TODO: Aran?
|
||||||
|
getAllNotes();
|
||||||
|
|
||||||
|
|
||||||
//https://thesocialnotework-api.appspot.com/api/note/all?uid=<USER_ID>
|
//https://thesocialnotework-api.appspot.com/api/note/all?uid=<USER_ID>
|
||||||
// The New "Add Button"
|
// The New "Add Button"
|
||||||
FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);
|
FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);
|
||||||
fab.setOnClickListener(addNewNoteDialog);
|
fab.setOnClickListener(addNewNoteDialog);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -130,8 +197,8 @@ public class PersonalFragment extends Fragment {
|
||||||
VolleyUtilSingleton.getInstance(getActivity()).get(BASE_URL + "/note/all?uid=" + userId, getNotesSuccessListener, Utils.genericErrorListener);
|
VolleyUtilSingleton.getInstance(getActivity()).get(BASE_URL + "/note/all?uid=" + userId, getNotesSuccessListener, Utils.genericErrorListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
private View.OnClickListener addNewNoteDialog = new View.OnClickListener() {
|
private View.OnClickListener addNewNoteDialog = new View.OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
//create and configure dialog
|
//create and configure dialog
|
||||||
final Dialog dialog = new Dialog(getActivity());
|
final Dialog dialog = new Dialog(getActivity());
|
||||||
|
@ -341,74 +408,73 @@ public class PersonalFragment extends Fragment {
|
||||||
// dialog.getWindow().setAttributes(lp);
|
// dialog.getWindow().setAttributes(lp);
|
||||||
|
|
||||||
|
|
||||||
//get note_view_full layout elements
|
//get note_view_full layout elements
|
||||||
final TextView title = (TextView) noteViewDialog.findViewById(R.id.ndf_title_textview);
|
final TextView title = (TextView) noteViewDialog.findViewById(R.id.ndf_title_textview);
|
||||||
final TextView body = (TextView) noteViewDialog.findViewById(R.id.ndf_body_textview);
|
final TextView body = (TextView) noteViewDialog.findViewById(R.id.ndf_body_textview);
|
||||||
final TextView time = (TextView) noteViewDialog.findViewById(R.id.ndf_time_textview);
|
final TextView time = (TextView) noteViewDialog.findViewById(R.id.ndf_time_textview);
|
||||||
final TextView date = (TextView) noteViewDialog.findViewById(R.id.ndf_date_textview);
|
final TextView date = (TextView) noteViewDialog.findViewById(R.id.ndf_date_textview);
|
||||||
final TextView location = (TextView) noteViewDialog.findViewById(R.id.ndf_address_textview);
|
final TextView location = (TextView) noteViewDialog.findViewById(R.id.ndf_address_textview);
|
||||||
final TextView likes = (TextView) noteViewDialog.findViewById(R.id.ndf_likes_textview);
|
final TextView likes = (TextView) noteViewDialog.findViewById(R.id.ndf_likes_textview);
|
||||||
// final TextView tags = (TextView) noteViewDialog.findViewById(R.id.ndf_tags_textview);
|
// final TextView tags = (TextView) noteViewDialog.findViewById(R.id.ndf_tags_textview);
|
||||||
final TextView permission = (TextView) noteViewDialog.findViewById(R.id.ndf_permission_textview);
|
final TextView permission = (TextView) noteViewDialog.findViewById(R.id.ndf_permission_textview);
|
||||||
final ImageButton deleteBtn = (ImageButton) noteViewDialog.findViewById(R.id.ndf_delete_imagebutton);
|
final ImageButton deleteBtn = (ImageButton) noteViewDialog.findViewById(R.id.ndf_delete_imagebutton);
|
||||||
final ImageView avatar = (RoundAvatarImageView) noteViewDialog.findViewById(R.id.note_user_avatar);
|
final ImageView avatar = (RoundAvatarImageView) noteViewDialog.findViewById(R.id.note_user_avatar);
|
||||||
|
|
||||||
|
|
||||||
title.setText(note.getTitle());
|
title.setText(note.getTitle());
|
||||||
body.setText(note.getBody());
|
body.setText(note.getBody());
|
||||||
date.setText(note.getDate());
|
date.setText(note.getDate());
|
||||||
time.setText(note.getTime());
|
time.setText(note.getTime());
|
||||||
location.setText(note.getAddress());
|
location.setText(note.getAddress());
|
||||||
if (likes != null) likes.setText("" + note.getLikes());
|
if(likes !=null )likes.setText("" + note.getLikes());
|
||||||
// tags.setText("Tags: "+ note.getTags().toString());
|
// tags.setText("Tags: "+ note.getTags().toString());
|
||||||
permission.setText("" + (note.isPublic() ? "Public" : "Private"));
|
permission.setText("" + (note.isPublic() ? "Public" : "Private"));
|
||||||
Utils.URLtoImageView(avatar, note.getAvatar());
|
Utils.URLtoImageView(avatar, note.getAvatar());
|
||||||
|
|
||||||
deleteBtn.setOnClickListener(new View.OnClickListener() {
|
deleteBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
//Put up the Yes/No message box
|
//Put up the Yes/No message box
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
builder
|
builder
|
||||||
.setTitle("Delete Note")
|
.setTitle("Delete Note")
|
||||||
.setMessage("Are you sure you want to delete the note?")
|
.setMessage("Are you sure you want to delete the note?")
|
||||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
//Yes button clicked, do something
|
//Yes button clicked, do something
|
||||||
Toast.makeText(getActivity(), "Item Deleted!",
|
Toast.makeText(getActivity(), "Item Deleted!",
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
//TODO send delete
|
//TODO send delete
|
||||||
JSONObject delNote = new JSONObject();
|
JSONObject delNote = new JSONObject();
|
||||||
try {
|
try {
|
||||||
delNote.put("uid", userId);
|
delNote.put("uid", userId);
|
||||||
delNote.put("nid", note.getId());
|
delNote.put("nid", note.getId());
|
||||||
VolleyUtilSingleton.getInstance(getActivity()).post(BASE_URL + "/note/delete", delNote, Utils.deleteNoteSuccessListener, Utils.genericErrorListener);
|
VolleyUtilSingleton.getInstance(getActivity()).post(BASE_URL + "/note/delete", delNote, Utils.deleteNoteSuccessListener, Utils.genericErrorListener);
|
||||||
activity.getUser().setNumber_of_notes(activity.getUser().getNumber_of_notes()-1);
|
listOfNotes.remove(position);
|
||||||
listOfNotes.remove(position);
|
|
||||||
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Toast.makeText(getActivity(), "Something went wrong.\n Failed to delete note...", Toast.LENGTH_LONG).show();
|
Toast.makeText(getActivity(), "Something went wrong.\n Failed to delete note...", Toast.LENGTH_LONG).show();
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
noteList.setAdapter(noteListAdapter);
|
||||||
|
noteViewDialog.dismiss();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
//Yes button clicked, do something
|
||||||
|
Toast.makeText(getActivity(), "Canceled",
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
|
noteViewDialog.dismiss();
|
||||||
|
}
|
||||||
|
}) //Do nothing on no
|
||||||
|
.show();
|
||||||
}
|
}
|
||||||
noteList.setAdapter(noteListAdapter);
|
});
|
||||||
noteViewDialog.dismiss();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
//Yes button clicked, do something
|
|
||||||
Toast.makeText(getActivity(), "Canceled",
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
noteViewDialog.dismiss();
|
|
||||||
}
|
|
||||||
}) //Do nothing on no
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
BIN
app/src/main/res/drawable/location_filter.png
Normal file
BIN
app/src/main/res/drawable/location_filter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
BIN
app/src/main/res/drawable/users_filter.png
Normal file
BIN
app/src/main/res/drawable/users_filter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 354 B |
|
@ -9,13 +9,79 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/mapFragment"
|
android:id="@+id/mapFragment"
|
||||||
class="com.google.android.gms.maps.SupportMapFragment">
|
class="com.google.android.gms.maps.SupportMapFragment"
|
||||||
|
android:layout_marginTop="50dp">
|
||||||
|
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/hello_blank_fragment" />
|
android:paddingTop="15dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contextClickable="false">
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:id="@+id/map_date_filter"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:src="@drawable/date_icon"
|
||||||
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:id="@+id/map_location_filter"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/location_filter" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:id="@+id/map_user_filter"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/users_filter" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contextClickable="false"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:id="@+id/map_filter_options">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="filter 1"
|
||||||
|
android:id="@+id/map_small_filter"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="filter 2"
|
||||||
|
android:id="@+id/map_medium_filter"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="filter 3"
|
||||||
|
android:id="@+id/map_large_filter"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -18,31 +18,71 @@
|
||||||
android:layout_marginBottom="5dp">
|
android:layout_marginBottom="5dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content">
|
||||||
android:layout_weight="0.1"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/ps_filters_textview"
|
android:orientation="horizontal"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:text="Filters and Shit"
|
android:contextClickable="false" >
|
||||||
android:layout_weight="0.8"/>
|
|
||||||
|
|
||||||
<Spinner
|
<ImageButton
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="50dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="50dp"
|
||||||
android:id="@+id/spinner"
|
android:id="@+id/personalSpace_date_filter"
|
||||||
android:spinnerMode="dropdown" />
|
android:layout_weight="1"
|
||||||
|
android:src="@drawable/date_icon"
|
||||||
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:id="@+id/personalSpace_premission_filter"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/permission_icon" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contextClickable="false"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:id="@+id/personalSpace_filter_options" >
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="filter 1"
|
||||||
|
android:id="@+id/personalSpace_small_filter"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="filter 2"
|
||||||
|
android:id="@+id/personalSpace_medium_filter"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="filter 3"
|
||||||
|
android:id="@+id/personalSpace_large_filter"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/ps_list_listview"
|
android:id="@+id/ps_list_listview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="0.8" />
|
android:layout_weight="0.8"
|
||||||
|
android:layout_marginTop="10dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="horizontal" android:layout_width="match_parent"
|
android:orientation="horizontal" android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="70dp"
|
android:layout_width="70dp"
|
||||||
|
@ -14,7 +15,8 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.6">
|
android:layout_weight="0.6"
|
||||||
|
android:layout_marginLeft="15dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
@ -99,7 +101,8 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:weightSum="1">
|
android:weightSum="1"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
|
|
Loading…
Reference in a new issue