Commit 9628597a authored by Jason Yeomans's avatar Jason Yeomans
Browse files

upgrade build tools to 25.0.2 (also in gitlab-ci), modify facility item to...

upgrade build tools to 25.0.2 (also in gitlab-ci), modify facility item to material spec, remove card views from notification dialog and rearrange buttons
parent a79578de
Pipeline #801 failed with stages
in 11 seconds
...@@ -2,8 +2,8 @@ image: openjdk:8-jdk ...@@ -2,8 +2,8 @@ image: openjdk:8-jdk
variables: variables:
ANDROID_COMPILE_SDK: "25" ANDROID_COMPILE_SDK: "25"
ANDROID_BUILD_TOOLS: "23.0.2" ANDROID_BUILD_TOOLS: "25.0.2"
ANDROID_SDK_TOOLS: "24.4.1" ANDROID_SDK_TOOLS: "25.2.5"
before_script: before_script:
- apt-get --quiet update --yes - apt-get --quiet update --yes
......
...@@ -5,7 +5,7 @@ apply plugin: 'me.tatarka.retrolambda' ...@@ -5,7 +5,7 @@ apply plugin: 'me.tatarka.retrolambda'
android { android {
compileSdkVersion 25 compileSdkVersion 25
buildToolsVersion '23.0.2' buildToolsVersion '25.0.2'
defaultConfig { defaultConfig {
applicationId "srct.whatsopen" applicationId "srct.whatsopen"
minSdkVersion 16 minSdkVersion 16
......
...@@ -2,32 +2,30 @@ package srct.whatsopen.views.activities; ...@@ -2,32 +2,30 @@ package srct.whatsopen.views.activities;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.LinearLayout; import android.widget.ProgressBar;
import com.astuetz.PagerSlidingTabStrip; import com.astuetz.PagerSlidingTabStrip;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import fr.castorflex.android.circularprogressbar.CircularProgressBar;
import io.realm.Realm;
import srct.whatsopen.R; import srct.whatsopen.R;
import srct.whatsopen.views.MainView;
import srct.whatsopen.presenters.MainPresenter; import srct.whatsopen.presenters.MainPresenter;
import srct.whatsopen.views.MainView;
import srct.whatsopen.views.adapters.FacilityListFragmentPagerAdapter; import srct.whatsopen.views.adapters.FacilityListFragmentPagerAdapter;
public class MainActivity extends AppCompatActivity implements MainView { public class MainActivity extends AppCompatActivity implements MainView {
@BindView(R.id.progress_bar) CircularProgressBar mProgressBar; @BindView(R.id.progress_bar)
@BindView(R.id.view_pager) ViewPager mViewPager; ProgressBar mProgressBar;
@BindView(R.id.view_pager)
ViewPager mViewPager;
private MainPresenter mPresenter; private MainPresenter mPresenter;
...@@ -75,7 +73,7 @@ public class MainActivity extends AppCompatActivity implements MainView { ...@@ -75,7 +73,7 @@ public class MainActivity extends AppCompatActivity implements MainView {
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) { switch (item.getItemId()) {
case R.id.action_refresh: case R.id.action_refresh:
mPresenter.loadFacilities(); mPresenter.loadFacilities();
return true; return true;
......
...@@ -65,14 +65,14 @@ public class FacilityListAdapter extends ...@@ -65,14 +65,14 @@ public class FacilityListAdapter extends
// show the duration that the facility will be open // show the duration that the facility will be open
setItemPaddingInDp(holder.textLayout, 8); setItemPaddingInDp(holder.textLayout, 8);
holder.durationTextView.setVisibility(View.VISIBLE); holder.durationTextView.setVisibility(View.VISIBLE);
holder.nameTextView.setTypeface(null, Typeface.BOLD); //holder.nameTextView.setTypeface(null, Typeface.BOLD);
} else { } else {
holder.itemView.setBackgroundColor(ContextCompat holder.itemView.setBackgroundColor(ContextCompat
.getColor(context, R.color.facilityClosed)); .getColor(context, R.color.facilityClosed));
setItemPaddingInDp(holder.textLayout, 15); setItemPaddingInDp(holder.textLayout, 15);
holder.durationTextView.setVisibility(View.GONE); holder.durationTextView.setVisibility(View.GONE);
holder.nameTextView.setTypeface(null, Typeface.NORMAL); //holder.nameTextView.setTypeface(null, Typeface.NORMAL);
} }
if(facility.isFavorited()) { if(facility.isFavorited()) {
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:height="8dp" <size android:height="1px"
android:width="8dp" /> android:width="8dp" />
<solid android:color="#80FFFFFF"/> <solid android:color="#aaaaaa"/>
</shape> </shape>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="match_parent"
android:layout_height="wrap_content"> android:orientation="horizontal">
<android.support.v7.widget.CardView <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:elevation="1dp" android:orientation="vertical">
android:layout_margin="6dp">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView <TextView
android:text="Notification Type" android:layout_width="match_parent"
android:paddingStart="2dp" android:layout_height="wrap_content"
android:paddingLeft="2dp" android:paddingLeft="2dp"
android:paddingRight="2dp" android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:layout_width="match_parent" android:text="Notification Type" />
android:layout_height="wrap_content"/>
<CheckBox <CheckBox
android:id="@+id/type_opening_check" android:id="@+id/type_opening_check"
android:text="Opening"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="Opening" />
<CheckBox <CheckBox
android:id="@+id/type_closing_check" android:id="@+id/type_closing_check"
android:text="Closing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="Closing" />
</LinearLayout> </LinearLayout>
</android.support.v7.widget.CardView>
<LinearLayout
android:orientation="vertical"
android:paddingTop="2dp"
android:paddingBottom="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content"> android:orientation="vertical"
android:paddingBottom="4dp"
android:paddingTop="2dp">
<Button <LinearLayout
android:id="@+id/save_button"
android:text="Save"
android:textColor="@color/colorPrimary"
android:layout_gravity="center_horizontal"
android:layout_weight="3"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/save_button"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_weight="3"
android:text="Save"
android:textColor="@color/colorPrimary" />
<Button
android:id="@+id/cancel_button"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:text="Cancel"
android:textColor="@color/colorPrimary" />
</LinearLayout>
<Button <Button
android:id="@+id/cancel_button" android:id="@+id/remove_button"
android:text="Cancel"
android:textColor="@color/colorPrimary"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
style="?android:borderlessButtonStyle" style="?android:borderlessButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Remove"
android:textColor="@color/colorPrimary"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
<Button
android:id="@+id/remove_button"
android:text="Remove"
android:textColor="@color/colorPrimary"
android:layout_gravity="center_horizontal"
android:visibility="gone"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout> </LinearLayout>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="1dp"
android:layout_margin="6dp">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView <TextView
android:text="Notification Interval" android:layout_width="match_parent"
android:textAlignment="center" android:layout_height="wrap_content"
android:paddingStart="2dp"
android:paddingLeft="2dp" android:paddingLeft="2dp"
android:paddingRight="2dp" android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:layout_width="match_parent" android:text="Notification Interval"
android:layout_height="wrap_content"/> android:textAlignment="center" />
<CheckBox <CheckBox
android:id="@+id/interval_on_check" android:id="@+id/interval_on_check"
android:text="On opening/closing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="On opening/closing" />
<CheckBox <CheckBox
android:id="@+id/interval_15_check" android:id="@+id/interval_15_check"
android:text="15 minutes before"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="15 minutes before" />
<CheckBox <CheckBox
android:id="@+id/interval_30_check" android:id="@+id/interval_30_check"
android:text="30 minutes before"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="30 minutes before" />
<CheckBox <CheckBox
android:id="@+id/interval_hour_check" android:id="@+id/interval_hour_check"
android:text="An hour before"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="An hour before" />
</LinearLayout> </LinearLayout>
</android.support.v7.widget.CardView> </LinearLayout>
</LinearLayout>
</ScrollView> </ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="srct.whatsopen.views.activities.MainActivity"> tools:context="srct.whatsopen.views.activities.MainActivity">
<LinearLayout <LinearLayout
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<include <include
layout="@layout/toolbar_main" layout="@layout/toolbar_main"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_width="match_parent"/> android:layout_height="wrap_content" />
<com.astuetz.PagerSlidingTabStrip <com.astuetz.PagerSlidingTabStrip
android:id="@+id/tabs" android:id="@+id/tabs"
app:pstsShouldExpand="true" android:layout_width="match_parent"
android:layout_height="48dp"
app:pstsIndicatorColor="@color/colorPrimary" app:pstsIndicatorColor="@color/colorPrimary"
app:pstsIndicatorHeight="6dp" app:pstsIndicatorHeight="6dp"
app:pstsTabBackground="@drawable/button_bg" app:pstsShouldExpand="true"
android:layout_width="match_parent" app:pstsTabBackground="@drawable/button_bg" />
android:layout_height="48dp"/>
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/view_pager" android:id="@+id/view_pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white"/> android:background="@android:color/white" />
</LinearLayout> </LinearLayout>
<fr.castorflex.android.circularprogressbar.CircularProgressBar <ProgressBar
android:id="@+id/progress_bar" android:id="@+id/progress_bar"
android:indeterminate="true" style="@style/Widget.AppCompat.ProgressBar"
android:visibility="gone" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
app:cpb_color="@color/colorPrimary" android:visibility="gone" />
app:cpb_rotation_speed="1.0"
app:cpb_sweep_speed="1.0"
app:cpb_stroke_width="6dp"
app:cpb_max_sweep_angle="300"
app:cpb_min_sweep_angle="10"
android:layout_width="80dp"
android:layout_height="80dp"/>
</FrameLayout> </FrameLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swipe_container" android:id="@+id/swipe_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="#FFFFFF" android:background="#FFFFFF"
tools:context="srct.whatsopen.views.fragments.FacilityListFragment"> tools:context="srct.whatsopen.views.fragments.FacilityListFragment">
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:elevation="1dp" android:orientation="vertical">
android:layout_margin="6dp">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView <TextView
android:text="Notification Type" android:layout_width="match_parent"
android:paddingStart="2dp" android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingLeft="2dp" android:paddingLeft="2dp"
android:paddingRight="2dp" android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:paddingBottom="2dp" android:text="Notification Type" />
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<View <View
android:layout_width="fill_parent" android:layout_width="fill_parent"
...@@ -37,41 +32,33 @@ ...@@ -37,41 +32,33 @@
<CheckBox <CheckBox
android:id="@+id/type_opening_check" android:id="@+id/type_opening_check"
android:text="Opening"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:text="Opening" />
<CheckBox <CheckBox
android:id="@+id/type_closing_check" android:id="@+id/type_closing_check"
android:text="Closing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/>