Merge branch 'master' of https://github.com/sagidayan/TheSocialNotework-Android
# Conflicts: # app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java # app/src/main/res/layout/fragment_personal.xml
This commit is contained in:
commit
b9e37f88b0
13 changed files with 538 additions and 190 deletions
|
@ -0,0 +1,198 @@
|
|||
package com.android_app.matan.ara.sagi.thesocialnotework;
|
||||
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.android.volley.Response;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class ExploreFragment extends Fragment {
|
||||
|
||||
private static final String TAG = "[TSN/Explore]";
|
||||
protected User user;
|
||||
protected MainActivity parent;
|
||||
private ListAdapter noteListAdapter;
|
||||
private List<Note> notes;
|
||||
protected ListView list_notes;
|
||||
|
||||
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 exploreFilters;
|
||||
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 others = "Others";
|
||||
private final String all = "All";
|
||||
|
||||
public ExploreFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_explore, container, false);
|
||||
|
||||
parent = (MainActivity)getActivity();
|
||||
user = parent.getUser();
|
||||
notes = new ArrayList<>();
|
||||
//Get Views
|
||||
list_notes = (ListView)view.findViewById(R.id.list_notes);
|
||||
noteListAdapter = new ListAdapter(parent, notes);
|
||||
|
||||
|
||||
dateFilter = (ImageButton) view.findViewById(R.id.explore_date_filter);
|
||||
locationFilter = (ImageButton) view.findViewById(R.id.explore_location_filter);
|
||||
userFilter = (ImageButton) view.findViewById(R.id.explore_user_filter);
|
||||
|
||||
map_small_filter = (Button) view.findViewById(R.id.explore_small_filter);
|
||||
map_medium_filter = (Button) view.findViewById(R.id.explore_medium_filter);
|
||||
map_large_filter = (Button) view.findViewById(R.id.explore_large_filter);
|
||||
|
||||
exploreFilters = (LinearLayout) view.findViewById(R.id.explore_filter_options);
|
||||
|
||||
dateFilter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// Log.d(TAG, "" + v.getId());
|
||||
if (dateFilterIsVisible) {
|
||||
dateFilterIsVisible = false;
|
||||
exploreFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
exploreFilters.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;
|
||||
exploreFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
exploreFilters.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;
|
||||
exploreFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
exploreFilters.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(others);
|
||||
map_large_filter.setText(all);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: choose a default filter for openning explore mode
|
||||
|
||||
try {
|
||||
getAllNotes();
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void getAllNotes() throws JSONException {
|
||||
Utils.showLoadingDialog(parent, "Exploring...", "Finding some new interesting notes just for you");
|
||||
Log.d(TAG, "url: " + Utils.BASE_URL + "/note/getPublic");
|
||||
String url = Utils.BASE_URL + "/note/getPublic";
|
||||
JSONObject payload = new JSONObject();
|
||||
payload.put("id", user.getId());
|
||||
VolleyUtilSingleton.getInstance(getActivity()).post(url, payload ,getNotesSuccessListener,Utils.genericErrorListener);
|
||||
}
|
||||
|
||||
Response.Listener<JSONObject> getNotesSuccessListener = new Response.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
Log.d(TAG, "getNotesSuccessListener: " + response.toString());
|
||||
Utils.dismissLoadingDialog();
|
||||
try {
|
||||
//need to get all notes and add to listOfNotes
|
||||
JSONArray noteObjectsArray = response.getJSONArray("notes");
|
||||
parent.getUser().setNumber_of_notes(noteObjectsArray.length());
|
||||
Date time = new Date();
|
||||
for (int i = 0; i < noteObjectsArray.length(); i++) {
|
||||
JSONObject noteObject = noteObjectsArray.getJSONObject(i);
|
||||
time.setTime(noteObject.getLong("created_at"));
|
||||
notes.add(Utils.getNoteFromJsonObj(noteObject, time));
|
||||
}
|
||||
list_notes.setAdapter(noteListAdapter);
|
||||
Utils.dismissLoadingDialog();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "newNoteSuccess:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}
|
|
@ -84,9 +84,9 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
|||
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 others = "others";
|
||||
private final String all = "all";
|
||||
private final String mine = "Mine";
|
||||
private final String others = "Others";
|
||||
private final String all = "All";
|
||||
|
||||
|
||||
|
||||
|
@ -144,10 +144,9 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
|||
dateFilter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// Log.d(TAG, "" + v.getId());
|
||||
if (dateFilterIsVisible) {
|
||||
dateFilterIsVisible = false;
|
||||
mapFilters.setVisibility(View.INVISIBLE);
|
||||
mapFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
mapFilters.setVisibility(View.VISIBLE);
|
||||
dateFilterIsVisible = true;
|
||||
|
@ -167,7 +166,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
|||
public void onClick(View v) {
|
||||
if (locationFilterIsVisible) {
|
||||
locationFilterIsVisible = false;
|
||||
mapFilters.setVisibility(View.INVISIBLE);
|
||||
mapFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
mapFilters.setVisibility(View.VISIBLE);
|
||||
locationFilterIsVisible = true;
|
||||
|
@ -187,7 +186,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback {
|
|||
public void onClick(View v) {
|
||||
if (userFilterIsVisible) {
|
||||
userFilterIsVisible = false;
|
||||
mapFilters.setVisibility(View.INVISIBLE);
|
||||
mapFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
mapFilters.setVisibility(View.VISIBLE);
|
||||
userFilterIsVisible = true;
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.view.ViewGroup;
|
|||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
//import com.android.volley.toolbox.NetworkImageView;
|
||||
|
@ -62,7 +63,7 @@ public class ListAdapter extends BaseAdapter {
|
|||
TextView date = (TextView) v.findViewById(R.id.nvm_date_textview);
|
||||
TextView location = (TextView) v.findViewById(R.id.nvm_location_textview);
|
||||
TextView likes = (TextView) v.findViewById(R.id.nvm_likes_textview);
|
||||
TextView permission = (TextView) v.findViewById(R.id.nvm_permission_textview);
|
||||
ImageView permission = (RoundAvatarImageView) v.findViewById(R.id.nvm_permission_image_view);
|
||||
// NetworkImageView thumbNail = (NetworkImageView) v.findViewById(R.id.infoImageImageView);
|
||||
// String url = mVideos.get(position).getImgURL();
|
||||
// thumbNail.setImageUrl(url, VolleyUtilSingleTone.getInstance(mContext).getImageLoader());
|
||||
|
@ -73,7 +74,11 @@ public class ListAdapter extends BaseAdapter {
|
|||
location.setText(curNote.getAddress());
|
||||
if(likes !=null )likes.setText(""+curNote.getLikes());
|
||||
// permission.setText(curNote.isPublic() ? "Public":"Private");
|
||||
permission.setBackground(curNote.isPublic() ? v.getResources().getDrawable(R.drawable.public_icon): v.getResources().getDrawable(R.drawable.private_icon));
|
||||
if(((MainActivity)mContext).getUser().getId().equals(curNote.ownerId)){// MY Note
|
||||
permission.setBackground(curNote.isPublic() ? v.getResources().getDrawable(R.drawable.public_icon): v.getResources().getDrawable(R.drawable.private_icon));
|
||||
}else{
|
||||
Utils.URLtoImageView(permission, curNote.getAvatar());
|
||||
}
|
||||
|
||||
Animation animation = AnimationUtils.loadAnimation(mContext, (position > lastPosition) ? R.anim.up_from_bottom : R.anim.down_from_top);
|
||||
v.startAnimation(animation);
|
||||
|
|
|
@ -52,6 +52,7 @@ public class MainActivity extends AppCompatActivity
|
|||
private GmapFragment gmapFragment;
|
||||
private PersonalFragment personalFragment;
|
||||
private SettingsFragment settingsFragment;
|
||||
private ExploreFragment exploreFragment;
|
||||
private Toolbar toolbar;
|
||||
public static final String BASE_URL = "http://thesocialnotework-api.appspot.com/api";
|
||||
private ImageView menu_avatar;
|
||||
|
@ -71,6 +72,7 @@ public class MainActivity extends AppCompatActivity
|
|||
gmapFragment = new GmapFragment();
|
||||
personalFragment = new PersonalFragment();
|
||||
settingsFragment = new SettingsFragment();
|
||||
exploreFragment = new ExploreFragment();
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
StrictMode.setThreadPolicy(policy);
|
||||
|
||||
|
@ -153,6 +155,9 @@ public class MainActivity extends AppCompatActivity
|
|||
if (id == R.id.nav_explore) {
|
||||
toolbar.setTitle("Explore");
|
||||
setSupportActionBar(toolbar);
|
||||
Log.d(TAG, "Before going to Explore");
|
||||
ft.replace(R.id.fragment_container, exploreFragment);
|
||||
ft.commit();
|
||||
} else if (id == R.id.nav_map) {
|
||||
|
||||
Log.d(TAG, "Before going to map");
|
||||
|
|
|
@ -142,7 +142,7 @@ public class PersonalFragment extends Fragment {
|
|||
Log.d(TAG, "onClick: dateFilter pressed");
|
||||
if (dateFilterIsVisible) {
|
||||
dateFilterIsVisible = false;
|
||||
personalSpaceFilters.setVisibility(View.INVISIBLE);
|
||||
personalSpaceFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
personalSpaceFilters.setVisibility(View.VISIBLE);
|
||||
dateFilterIsVisible = true;
|
||||
|
@ -163,7 +163,7 @@ public class PersonalFragment extends Fragment {
|
|||
//if pressed same filter twice - close filters.
|
||||
if (userFilterIsVisible) {
|
||||
userFilterIsVisible = false;
|
||||
personalSpaceFilters.setVisibility(View.INVISIBLE);
|
||||
personalSpaceFilters.setVisibility(View.GONE);
|
||||
} else {
|
||||
personalSpaceFilters.setVisibility(View.VISIBLE);
|
||||
userFilterIsVisible = true;
|
||||
|
@ -192,20 +192,23 @@ public class PersonalFragment extends Fragment {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
Utils.dismissLoadingDialog();
|
||||
Log.d(TAG, "onAttach");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
Utils.dismissLoadingDialog();
|
||||
}
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
Utils.dismissLoadingDialog();
|
||||
Log.d(TAG, "onAttach");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
Utils.dismissLoadingDialog();
|
||||
}
|
||||
|
||||
public void getAllNotes() {
|
||||
Log.d(TAG, "url: " + BASE_URL + "/note/all?uid=" + userId);
|
||||
VolleyUtilSingleton.getInstance(getActivity()).get(BASE_URL + "/note/all?uid=" + userId, getNotesSuccessListener, Utils.genericErrorListener);
|
||||
}
|
||||
|
||||
private View.OnClickListener addNewNoteDialog = new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
|
|
BIN
app/src/main/res/drawable/new_note.png
Normal file
BIN
app/src/main/res/drawable/new_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 187 B |
93
app/src/main/res/layout/fragment_explore.xml
Normal file
93
app/src/main/res/layout/fragment_explore.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.android_app.matan.ara.sagi.thesocialnotework.ExploreFragment"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="15dp">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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/explore_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/explore_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/explore_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="gone"
|
||||
android:id="@+id/explore_filter_options" >
|
||||
|
||||
<Button
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="filter 1"
|
||||
android:id="@+id/explore_small_filter"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="filter 2"
|
||||
android:id="@+id/explore_medium_filter"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="filter 3"
|
||||
android:id="@+id/explore_large_filter"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/list_notes"
|
||||
android:choiceMode="none" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -58,7 +58,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:contextClickable="false"
|
||||
android:layout_marginTop="5dp"
|
||||
android:visibility="invisible"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/map_filter_options">
|
||||
|
||||
<Button
|
||||
|
|
|
@ -9,71 +9,76 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="com.android_app.matan.ara.sagi.thesocialnotework.PersonalSpaceActivity">
|
||||
tools:context="com.android_app.matan.ara.sagi.thesocialnotework.PersonalSpaceActivity"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contextClickable="false"
|
||||
android:orientation="horizontal">
|
||||
android:contextClickable="false" >
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:id="@+id/personalSpace_date_filter"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/date_icon"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/date_icon" />
|
||||
android:focusable="false" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/personalSpace_premission_filter"
|
||||
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" />
|
||||
android:src="@drawable/permission_icon"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/personalSpace_filter_options"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:contextClickable="false"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="invisible">
|
||||
android:layout_marginTop="5dp"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/personalSpace_filter_options"
|
||||
android:clickable="false"
|
||||
android:focusableInTouchMode="false">
|
||||
|
||||
<Button
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="filter 1"
|
||||
android:id="@+id/personalSpace_small_filter"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:text="filter 1" />
|
||||
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_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:text="filter 2" />
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/personalSpace_large_filter"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:text="filter 3" />
|
||||
android:text="filter 3"
|
||||
android:id="@+id/personalSpace_large_filter"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -81,10 +86,8 @@
|
|||
android:id="@+id/ps_list_listview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="0.8" />
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -8,7 +8,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20dp"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:minWidth="330dp"
|
||||
android:paddingBottom="22dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
|
@ -26,7 +31,8 @@
|
|||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ndf_title_textview"
|
||||
|
@ -50,7 +56,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
|
@ -150,8 +156,10 @@
|
|||
android:id="@+id/ndf_delete_imagebutton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="right"
|
||||
android:background="@android:drawable/ic_menu_delete" />
|
||||
android:background="@android:drawable/ic_menu_delete"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,79 +2,104 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView10"
|
||||
android:src="@drawable/new_note"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="New Note"
|
||||
android:id="@+id/textView" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="New Note"
|
||||
android:id="@+id/textView"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/nvf_note_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoText="false"
|
||||
android:editable="true"
|
||||
android:elegantTextHeight="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#c5c4c4"
|
||||
android:hint="Title" />
|
||||
android:id="@+id/nvf_note_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoText="false"
|
||||
android:editable="true"
|
||||
android:elegantTextHeight="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#c5c4c4"
|
||||
android:hint="Title"
|
||||
android:layout_marginTop="15dp" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_weight="0.5">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<EditText
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textMultiLine"
|
||||
android:ems="10"
|
||||
android:id="@+id/nvf_note_content"
|
||||
android:hint="Note Body"
|
||||
android:layout_weight="0.24" />
|
||||
</ScrollView>
|
||||
<EditText
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textMultiLine"
|
||||
android:ems="10"
|
||||
android:id="@+id/nvf_note_content"
|
||||
android:hint="Note Body"
|
||||
android:layout_weight="0.24" />
|
||||
</ScrollView>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/nvf_note_permission"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:checked="true"
|
||||
android:text="@string/nvf_public_label"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:id="@+id/nvf_note_permission"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:checked="true"
|
||||
android:text="@string/nvf_public_label"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/nvf_note_submit_btn"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/note_me"
|
||||
android:layout_margin="15dp"
|
||||
android:drawableLeft="@android:drawable/ic_menu_send"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp" />
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/nvf_note_cancel_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/throw_me"
|
||||
android:layout_marginTop="15dp"
|
||||
android:drawableLeft="@android:drawable/ic_menu_delete" />
|
||||
<Button
|
||||
android:id="@+id/nvf_note_submit_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/note_me"
|
||||
android:layout_margin="15dp"
|
||||
android:drawableLeft="@android:drawable/ic_menu_send"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="#ffffff"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp" />
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/nvf_note_cancel_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/throw_me"
|
||||
android:layout_marginTop="15dp"
|
||||
android:drawableLeft="@android:drawable/ic_menu_delete" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
|
@ -1,121 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal" android:layout_width="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
<!--<ImageView-->
|
||||
<!--android:layout_width="70dp"-->
|
||||
<!--android:layout_height="70dp"-->
|
||||
<!--android:id="@+id/nvm_permission_image_view"-->
|
||||
<!--android:layout_gravity="left" />-->
|
||||
|
||||
<com.android_app.matan.ara.sagi.thesocialnotework.RoundAvatarImageView
|
||||
android:id="@+id/nvm_permission_image_view"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:id="@+id/nvm_permission_textview"
|
||||
android:background="@drawable/private_icon"
|
||||
android:gravity="center_vertical|center_horizontal" />
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="0.6"
|
||||
android:layout_marginLeft="15dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nvm_title_textview"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="Note Title"
|
||||
android:id="@+id/nvm_title_textview"
|
||||
android:textStyle="bold"
|
||||
android:textSize="18dp" />
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/imageView4"
|
||||
android:src="@drawable/date_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nvm_date_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="Date and time"
|
||||
android:id="@+id/nvm_date_textview"
|
||||
android:textSize="9dp"
|
||||
android:gravity="fill_horizontal|fill_vertical"
|
||||
android:padding="5dp" />
|
||||
android:padding="5dp"
|
||||
android:text="Date and time"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="9dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="28dp"
|
||||
android:id="@+id/imageView3"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/time_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nvm_time_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="Date and time"
|
||||
android:id="@+id/nvm_time_textview"
|
||||
android:textSize="9dp"
|
||||
android:gravity="fill_horizontal|center_vertical"
|
||||
android:padding="5dp" />
|
||||
android:padding="5dp"
|
||||
android:text="Date and time"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="9dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView5"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="28dp"
|
||||
android:id="@+id/imageView5"
|
||||
android:src="@drawable/location_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nvm_location_textview"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="location"
|
||||
android:id="@+id/nvm_location_textview"
|
||||
android:textSize="9dp"
|
||||
android:gravity="fill_horizontal|fill_vertical"
|
||||
android:padding="5dp" />
|
||||
android:padding="5dp"
|
||||
android:text="location"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="9dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.3">
|
||||
android:layout_gravity="right"
|
||||
android:layout_weight="0.3"
|
||||
android:gravity="end">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="1"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/imageView2"
|
||||
android:src="@drawable/like_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nvm_likes_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Likes"
|
||||
android:id="@+id/nvm_likes_textview"
|
||||
android:gravity="center_vertical|center_horizontal" />
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="Likes" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
<resources>
|
||||
<string name="app_name">TSN</string>
|
||||
<string name="app_name">TSN</string>
|
||||
|
||||
<!-- Strings related to login -->
|
||||
<string name="prompt_email">Email</string>
|
||||
<string name="prompt_username">Username</string>
|
||||
<string name="prompt_password">Password</string>
|
||||
<string name="action_login">Login</string>
|
||||
<string name="action_register">Register</string>
|
||||
<string name="register">Register</string>
|
||||
<string name="create_new_account">No account yet? Create one for FREE</string>
|
||||
<string name="action_sign_in_short">Sign in</string>
|
||||
<string name="error_invalid_email">This email address is invalid</string>
|
||||
<string name="error_invalid_password">This password is too short</string>
|
||||
<string name="error_incorrect_password">This password is incorrect</string>
|
||||
<string name="error_field_required">This field is required</string>
|
||||
<!-- Strings related to login -->
|
||||
<string name="prompt_email">Email</string>
|
||||
<string name="prompt_username">Username</string>
|
||||
<string name="prompt_password">Password</string>
|
||||
<string name="action_login">Login</string>
|
||||
<string name="action_register">Register</string>
|
||||
<string name="register">Register</string>
|
||||
<string name="create_new_account">No account yet? Create one for FREE</string>
|
||||
<string name="action_sign_in_short">Sign in</string>
|
||||
<string name="error_invalid_email">This email address is invalid</string>
|
||||
<string name="error_invalid_password">This password is too short</string>
|
||||
<string name="error_incorrect_password">This password is incorrect</string>
|
||||
<string name="error_field_required">This field is required</string>
|
||||
<string name="permission_rationale">"Contacts permissions are needed for providing email
|
||||
completions."
|
||||
</string>
|
||||
<string name="title_activity_personal_space">PersonalSpaceActivity</string>
|
||||
<string name="nvf_private_label">Private</string>
|
||||
<string name="nvf_public_label">Public</string>
|
||||
<string name="logo">Logo</string>
|
||||
<string name="nvf_title">Title</string>
|
||||
<string name="nvf_content">Content</string>
|
||||
<string name="throw_me">Discard</string>
|
||||
<string name="note_me">Save</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="title_activity_main">MainActivity</string>
|
||||
<string name="title_activity_personal_space">PersonalSpaceActivity</string>
|
||||
<string name="nvf_private_label">Private</string>
|
||||
<string name="nvf_public_label">Public</string>
|
||||
<string name="logo">Logo</string>
|
||||
<string name="nvf_title">Title</string>
|
||||
<string name="nvf_content">Content</string>
|
||||
<string name="throw_me">Discard</string>
|
||||
<string name="note_me">Save</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="title_activity_main">MainActivity</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="login_err_message_invalid">Password should be at least 4 chars long</string>
|
||||
<string name="title_activity_maps">Map</string>
|
||||
<string name="avatar">Avatar</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="login_err_message_invalid">Password should be at least 4 chars long</string>
|
||||
<string name="title_activity_maps">Map</string>
|
||||
<string name="avatar">Avatar</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue