Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa Lange committed Apr 29, 2015
2 parents 64517a1 + 7ef5bb3 commit d8b18d8
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ public void init(Bundle savedInstanceState) {


// create sections
this.addSection(newSection(getString(R.string.menu_join_trip), R.drawable.ic_settings, new JoinTripFragment()));
this.addSection(newSection(getString(R.string.menu_offer_trip), R.drawable.ic_settings, new OfferTripFragment()));
this.addSection(newSection(getString(R.string.menu_join_trip), R.drawable.hitchhiker, new JoinTripFragment()));
this.addSection(newSection(getString(R.string.menu_offer_trip), R.drawable.ic_directions_car_white, new OfferTripFragment()));
if(LoginActivity.isUserLoggedIn(this)) {
// only logged-in users can view their profile
this.addSection(newSection(getString(R.string.menu_profile), R.drawable.ic_settings, new ProfileFragment()));
this.addSection(newSection(getString(R.string.menu_profile), R.drawable.profile_icon, new ProfileFragment()));
}
this.addSection(newSection(getString(R.string.navigation), R.drawable.ic_settings, new NavigationFragment()));
this.addSection(newSection(getString(R.string.navigation), R.drawable.distance, new NavigationFragment()));

((MaterialSection) getSectionList().get(0)).setNotifications(3);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

Expand All @@ -37,7 +38,8 @@ public class JoinTripFragment extends Fragment {

private final int REQUEST_PLACE_PICKER = 122;

private TextView tv_name, tv_address, tv_attributions;
private TextView tv_name, tv_attributions;
private EditText tv_address;
private Button btn_destination;

@Override
Expand All @@ -55,7 +57,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
View view = inflater.inflate(R.layout.fragment_join_trip, container, false);

tv_name = (TextView) view.findViewById(R.id.name);
tv_address = (TextView) view.findViewById(R.id.address);
tv_address = (EditText) view.findViewById(R.id.address);
tv_attributions = (TextView) view.findViewById(R.id.attributions);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

Expand All @@ -39,7 +40,8 @@ public class OfferTripFragment extends Fragment {

private final int REQUEST_PLACE_PICKER = 122;

private TextView tv_name, tv_address, tv_attributions;
private TextView tv_name, tv_attributions;
private EditText tv_address;
private Button btn_destination;

public static OfferTripFragment get() {
Expand Down Expand Up @@ -67,7 +69,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
View view = inflater.inflate(R.layout.fragment_offer_trip, container, false);

tv_name = (TextView) view.findViewById(R.id.name);
tv_address = (TextView) view.findViewById(R.id.address);
tv_address = (EditText) view.findViewById(R.id.address);
tv_attributions = (TextView) view.findViewById(R.id.attributions);


Expand Down
Binary file added client/src/main/res/drawable/distance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/main/res/drawable/hitchhiker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/main/res/drawable/profile_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions client/src/main/res/layout/fragment_join_trip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:id="@+id/name"/>
android:id="@+id/name"
android:layout_gravity="center_horizontal"/>

<TextView
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:id="@+id/address"/>
android:id="@+id/address"
android:minWidth="200dp"
android:hint="Enter address"
android:layout_gravity="center_horizontal"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:id="@+id/attributions"/>
android:id="@+id/attributions"
android:layout_gravity="center_horizontal"/>

<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/waitingTime"
Expand Down
13 changes: 9 additions & 4 deletions client/src/main/res/layout/fragment_offer_trip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:id="@+id/name"/>
android:id="@+id/name"
android:layout_gravity="center_horizontal"/>

<TextView
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:id="@+id/address"/>
android:id="@+id/address"
android:minWidth="200dp"
android:hint="Enter address"
android:layout_gravity="center_horizontal"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:id="@+id/attributions"/>
android:id="@+id/attributions"
android:layout_gravity="center_horizontal"/>

<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/diversion"
Expand Down

0 comments on commit d8b18d8

Please sign in to comment.