Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "com.thunsaker.rapido"
minSdkVersion 14
targetSdkVersion 23
versionCode 2101
versionName "2.1.01"
versionCode 2120
versionName "2.1.2"
resConfigs "en", "es"
}

Expand Down Expand Up @@ -84,6 +84,8 @@ dependencies {
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'

compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
Expand All @@ -98,7 +100,6 @@ dependencies {
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.jakewharton.rxbinding:rxbinding:0.2.0'

compile 'com.melnykov:floatingactionbutton:1.1.0'
compile 'com.github.talenguyen:prettysharedpreferences:1.0.2'
compile 'com.twitter:twitter-text:1.9.0'
compile 'org.twitter4j:twitter4j-core:4.0.2'
Expand Down
18 changes: 12 additions & 6 deletions mobile/src/main/java/com/thunsaker/rapido/ui/MainFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@
import android.widget.TextView;
import android.widget.Toast;

import com.facebook.*;
import com.facebook.AccessToken;
import com.facebook.CallbackManager;
import com.facebook.FacebookCallback;
import com.facebook.FacebookException;
import com.facebook.FacebookSdk;
import com.facebook.GraphRequest;
import com.facebook.GraphResponse;
import com.facebook.login.LoginResult;
import com.foursquare.android.nativeoauth.FoursquareOAuth;
import com.foursquare.android.nativeoauth.model.AccessTokenResponse;
Expand Down Expand Up @@ -86,22 +92,22 @@
import com.wangjie.wavecompat.WaveDrawable;
import com.wangjie.wavecompat.WaveTouchHelper;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.Collections;
import java.util.List;
import java.util.Locale;

import javax.inject.Inject;

import butterknife.ButterKnife;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.OnLongClick;
import de.greenrobot.event.EventBus;
import io.fabric.sdk.android.Fabric;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
import rx.functions.Func1;
Expand Down
259 changes: 259 additions & 0 deletions mobile/src/main/res/layout-large/fragment_compose.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary">

<View
android:id="@+id/header_color_block"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/compose_wrapper_card"
android:layout_alignParentTop="true"
android:layout_marginBottom="60dp"
android:minHeight="200dp" />

<LinearLayout
android:id="@+id/compose_color_block"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-60dp"
android:layout_alignParentBottom="true"
android:layout_below="@+id/compose_wrapper_card"
android:background="@color/gray_light_super"
android:orientation="horizontal">
<!--<FrameLayout-->
<!--android:id="@+id/compose_map_wrapper"-->
<!--android:layout_width="fill_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:visibility="gone">-->
<!--<fragment-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:id="@+id/map"-->
<!--tools:context="com.thunsaker.rapido.ui.LocationPicker"-->
<!--android:name="com.google.android.gms.maps.SupportMapFragment" />-->
<!--</FrameLayout>-->

</LinearLayout>

<android.support.v7.widget.CardView
android:id="@+id/compose_wrapper_card"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/material_padding"
android:layout_marginLeft="@dimen/card_padding"
android:layout_marginStart="@dimen/card_padding"
android:layout_marginRight="@dimen/card_padding"
android:layout_marginEnd="@dimen/card_padding">
<LinearLayout
android:id="@+id/compose_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/white">
<LinearLayout
android:id="@+id/compose_to_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_margin="@dimen/material_padding"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/compose_to_chips_wrapper"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|center"
android:orientation="horizontal">
<include
android:id="@+id/compose_to_chip_twitter"
layout="@layout/chip_twitter"/>
<include
android:id="@+id/compose_to_chip_facebook"
layout="@layout/chip_facebook" />
<include
android:id="@+id/compose_to_chip_foursquare"
layout="@layout/chip_foursquare" />
<include
android:id="@+id/compose_to_chip_plus"
layout="@layout/chip_plus" />
<include
android:id="@+id/compose_to_chip_bitly"
layout="@layout/chip_bitly" />
</LinearLayout>
</LinearLayout>

<View
android:id="@+id/seamCompose"
android:layout_height="1dp"
android:layout_width="fill_parent"
android:background="@color/gray_light_super" />

<RelativeLayout
android:id="@+id/compose_edit_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="150dp">

<EditText
android:id="@+id/compose_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="6"
android:maxLines="6"
android:minHeight="@dimen/material_section_height_xlarge"
android:maxHeight="400dp"
android:gravity="top|start"
android:textColor="@color/primary_text"
android:textSize="@dimen/material_type_small"
android:hint="@string/compose_placeholder"
android:paddingTop="@dimen/material_padding"
android:paddingBottom="@dimen/material_padding_double"
android:layout_marginTop="@dimen/material_padding"
android:layout_marginLeft="@dimen/material_keyline_1"
android:layout_marginStart="@dimen/material_keyline_1"
android:layout_marginRight="@dimen/material_keyline_1"
android:layout_marginEnd="@dimen/material_keyline_1"
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"
android:imeOptions="flagNoExtractUi" />

<TextView
android:id="@+id/compose_text_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="60sp"
android:textColor="@color/character_count_default"
android:layout_marginRight="@dimen/material_keyline_1"
android:layout_marginEnd="@dimen/material_keyline_1"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
tools:ignore="RelativeOverlap" />

<ImageButton
android:id="@+id/compose_add_location"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/material_keyline_1"
android:layout_marginStart="@dimen/material_keyline_1"
android:layout_marginBottom="@dimen/material_padding"
android:layout_marginTop="@dimen/material_padding_double"
android:layout_below="@id/compose_edit_text"
android:padding="@dimen/material_padding_half"
android:src="@drawable/location_icon"
android:tint="@color/accent"
android:background="@null"
android:scaleType="fitCenter"
android:contentDescription="@string/location_add"
android:elevation="5dp"
android:visibility="visible"
tools:ignore="UnusedAttribute" />

<Button
android:id="@+id/compose_send_button"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:minWidth="96dp"
android:layout_marginRight="@dimen/material_keyline_1_offset_plus"
android:layout_marginEnd="@dimen/material_keyline_1_offset_plus"
android:layout_marginLeft="@dimen/material_padding"
android:layout_marginStart="@dimen/material_padding"
android:layout_marginBottom="@dimen/material_padding_double"
android:layout_marginTop="@dimen/material_padding_double"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@id/compose_edit_text"
android:elevation="5dp"
android:textColor="@color/white"
android:text="@string/action_send"
android:textSize="14sp"
android:textAllCaps="true"
android:background="@drawable/background_button_rectangle"
tools:ignore="UnusedAttribute" />

<RelativeLayout
android:id="@+id/compose_location_wrapper"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/location_height"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/material_keyline_1"
android:layout_marginStart="@dimen/material_keyline_1"
android:layout_marginRight="@dimen/material_keyline_1"
android:layout_marginEnd="@dimen/material_keyline_1"
android:layout_marginBottom="@dimen/material_padding"
android:layout_marginTop="@dimen/material_padding"
android:layout_below="@id/compose_edit_text"
android:layout_toLeftOf="@+id/compose_send_button"
android:layout_toStartOf="@+id/compose_send_button"
android:visibility="gone">

<ImageButton
android:id="@+id/compose_remove_location"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_action_close_white"
android:tint="@color/accent"
android:background="@drawable/ripple_red"
android:scaleType="fitCenter"
android:contentDescription="@string/location_add"
android:elevation="5dp"
tools:ignore="UnusedAttribute" />

<TextView
android:id="@+id/compose_location_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/primary_text"
android:maxLines="2"
android:paddingLeft="@dimen/material_padding"
android:layout_toRightOf="@+id/compose_remove_location"
android:ellipsize="end"
android:gravity="center_vertical"
tools:ignore="RtlHardcoded,RtlSymmetry" />

</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>

<!--<android.support.design.widget.FloatingActionButton-->
<!--android:id="@+id/compose_send_fab"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_width="wrap_content"-->
<!--android:src="@drawable/ic_action_send_white"-->
<!--android:layout_alignParentRight="true"-->
<!--android:layout_alignParentEnd="true"-->
<!--android:layout_below="@id/header_color_block"-->
<!--android:layout_marginRight="@dimen/fab_side_margin"-->
<!--android:layout_marginEnd="@dimen/fab_side_margin"-->
<!--android:layout_marginTop="-110dp"/>-->

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/material_keyline_1"
android:visibility="gone">

<com.twitter.sdk.android.core.identity.TwitterLoginButton
android:id="@+id/twitter_login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />

<com.facebook.login.widget.LoginButton
android:id="@+id/facebook_login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_gravity="center" />

</LinearLayout>
</RelativeLayout>
2 changes: 1 addition & 1 deletion mobile/src/main/res/layout/activity_location_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<FrameLayout
android:id="@+id/map_wrapper"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_height="@dimen/location_picker_map_height"
android:layout_alignParentTop="true">
<fragment
android:layout_width="match_parent"
Expand Down
5 changes: 4 additions & 1 deletion mobile/src/main/res/layout/chip_add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/material_icon_size_micro"
android:layout_height="@dimen/material_icon_size_micro"
android:layout_margin="@dimen/material_padding"
android:padding="@dimen/material_padding_half"
android:layout_marginTop="@dimen/material_padding"
android:layout_marginLeft="@dimen/chip_padding"
android:layout_marginRight="@dimen/chip_padding"
android:layout_marginBottom="@dimen/material_padding"
android:background="@drawable/circle_add"
android:src="@drawable/ic_action_add"
android:tint="@color/white"
Expand Down
5 changes: 4 additions & 1 deletion mobile/src/main/res/layout/chip_bitly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/material_icon_size_micro"
android:layout_height="@dimen/material_icon_size_micro"
android:layout_margin="@dimen/material_padding"
android:padding="@dimen/material_padding_half"
android:layout_marginTop="@dimen/material_padding"
android:layout_marginLeft="@dimen/chip_padding"
android:layout_marginRight="@dimen/chip_padding"
android:layout_marginBottom="@dimen/material_padding"
android:clickable="true"
android:background="@drawable/circle_bitly"
android:src="@drawable/selector_bitly_icon"
Expand Down
5 changes: 4 additions & 1 deletion mobile/src/main/res/layout/chip_facebook.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/material_icon_size_micro"
android:layout_height="@dimen/material_icon_size_micro"
android:layout_margin="@dimen/material_padding"
android:padding="@dimen/material_padding"
android:layout_marginTop="@dimen/material_padding"
android:layout_marginLeft="@dimen/chip_padding"
android:layout_marginRight="@dimen/chip_padding"
android:layout_marginBottom="@dimen/material_padding"
android:clickable="true"
android:background="@drawable/circle_facebook"
android:src="@drawable/selector_facebook_icon"
Expand Down
5 changes: 4 additions & 1 deletion mobile/src/main/res/layout/chip_foursquare.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/material_icon_size_micro"
android:layout_height="@dimen/material_icon_size_micro"
android:layout_margin="@dimen/material_padding"
android:padding="@dimen/material_padding"
android:layout_marginTop="@dimen/material_padding"
android:layout_marginLeft="@dimen/chip_padding"
android:layout_marginRight="@dimen/chip_padding"
android:layout_marginBottom="@dimen/material_padding"
android:clickable="true"
android:background="@drawable/circle_foursquare"
android:src="@drawable/selector_foursquare_icon"
Expand Down
Loading