Skip to content

Commit

Permalink
Merge pull request #40 from thunsaker/feature/permissions
Browse files Browse the repository at this point in the history
Marshmallow Permissions Model
  • Loading branch information
thunsaker committed Oct 23, 2015
2 parents e78dd17 + a7f7989 commit eff3de6
Show file tree
Hide file tree
Showing 17 changed files with 490 additions and 241 deletions.
10 changes: 5 additions & 5 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 2010
versionName "2.0.1"
versionCode 2101
versionName "2.1.01"
resConfigs "en", "es"
}

Expand Down Expand Up @@ -81,9 +81,9 @@ dependencies {
transitive = true
}

compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
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.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 Down
1 change: 0 additions & 1 deletion mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.thunsaker.rapido" >

<uses-permission android:name="android.permission.INTERNET" />
Expand Down
224 changes: 191 additions & 33 deletions mobile/src/main/java/com/thunsaker/rapido/ui/MainFragment.java

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 mobile/src/main/res/drawable/rice_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions mobile/src/main/res/drawable/rice_green_tiled.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/rice_green"
android:tileMode="repeat"
android:dither="true" />
Binary file added mobile/src/main/res/drawable/rice_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions mobile/src/main/res/drawable/rice_orange_tiled.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/rice_orange"
android:tileMode="repeat"
android:dither="true" />
Binary file added mobile/src/main/res/drawable/rice_yellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions mobile/src/main/res/drawable/rice_yellow_tiled.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/rice_yellow"
android:tileMode="repeat"
android:dither="true" />
32 changes: 32 additions & 0 deletions mobile/src/main/res/layout/dialog_permissions_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_gravity="center"
android:background="@drawable/rice_green_tiled">

<ImageView
android:id="@+id/imagePermissionHeader"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/permission_header_lock"
android:gravity="center_horizontal"
android:scaleType="fitCenter"
android:contentDescription="@string/perm_header_image_lock" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/material_type_small"
android:gravity="center"
android:textColor="@color/white"
android:layout_marginTop="@dimen/material_padding_quadruple"
android:paddingBottom="@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:text="@string/perm_get_accounts_explainer" />
</LinearLayout>
34 changes: 34 additions & 0 deletions mobile/src/main/res/layout/dialog_permissions_location.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:background="@drawable/rice_orange_tiled"
android:orientation="vertical">

<ImageView
android:id="@+id/imagePermissionHeader"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/permission_header_marker"
android:layout_gravity="center_horizontal"
android:scaleType="fitCenter"
android:contentDescription="@string/perm_header_image_location"
tools:ignore="UnusedAttribute"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/material_type_small"
android:textColor="@color/white"
android:gravity="center"
android:layout_marginTop="@dimen/material_padding_quadruple"
android:paddingBottom="@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:text="@string/perm_location_explainer" />
</LinearLayout>
Loading

0 comments on commit eff3de6

Please sign in to comment.