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
variables:
ANDROID_COMPILE_SDK: "25"
ANDROID_BUILD_TOOLS: "23.0.2"
ANDROID_SDK_TOOLS: "24.4.1"
ANDROID_BUILD_TOOLS: "25.0.2"
ANDROID_SDK_TOOLS: "25.2.5"
before_script:
- apt-get --quiet update --yes
......
......@@ -5,7 +5,7 @@ apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 25
buildToolsVersion '23.0.2'
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "srct.whatsopen"
minSdkVersion 16
......
......@@ -2,32 +2,30 @@ package srct.whatsopen.views.activities;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import com.astuetz.PagerSlidingTabStrip;
import butterknife.BindView;
import butterknife.ButterKnife;
import fr.castorflex.android.circularprogressbar.CircularProgressBar;
import io.realm.Realm;
import srct.whatsopen.R;
import srct.whatsopen.views.MainView;
import srct.whatsopen.presenters.MainPresenter;
import srct.whatsopen.views.MainView;
import srct.whatsopen.views.adapters.FacilityListFragmentPagerAdapter;
public class MainActivity extends AppCompatActivity implements MainView {
@BindView(R.id.progress_bar) CircularProgressBar mProgressBar;
@BindView(R.id.view_pager) ViewPager mViewPager;
@BindView(R.id.progress_bar)
ProgressBar mProgressBar;
@BindView(R.id.view_pager)
ViewPager mViewPager;
private MainPresenter mPresenter;
......@@ -75,7 +73,7 @@ public class MainActivity extends AppCompatActivity implements MainView {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
switch (item.getItemId()) {
case R.id.action_refresh:
mPresenter.loadFacilities();
return true;
......
......@@ -65,14 +65,14 @@ public class FacilityListAdapter extends
// show the duration that the facility will be open
setItemPaddingInDp(holder.textLayout, 8);
holder.durationTextView.setVisibility(View.VISIBLE);
holder.nameTextView.setTypeface(null, Typeface.BOLD);
//holder.nameTextView.setTypeface(null, Typeface.BOLD);
} else {
holder.itemView.setBackgroundColor(ContextCompat
.getColor(context, R.color.facilityClosed));
setItemPaddingInDp(holder.textLayout, 15);
holder.durationTextView.setVisibility(View.GONE);
holder.nameTextView.setTypeface(null, Typeface.NORMAL);
//holder.nameTextView.setTypeface(null, Typeface.NORMAL);
}
if(facility.isFavorited()) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:height="8dp"
<size android:height="1px"
android:width="8dp" />
<solid android:color="#80FFFFFF"/>
<solid android:color="#aaaaaa"/>
</shape>
......@@ -3,149 +3,134 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:orientation="horizontal"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="1dp"
android:layout_margin="6dp">
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:text="Notification Type"
android:paddingStart="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:text="Notification Type" />
<CheckBox
android:id="@+id/type_opening_check"
android:text="Opening"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="Opening" />
<CheckBox
android:id="@+id/type_closing_check"
android:text="Closing"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="Closing" />
</LinearLayout>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="2dp"
android:paddingBottom="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:paddingTop="2dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
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_height="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"
android:text="Cancel"
android:textColor="@color/colorPrimary"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="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
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"/>
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Remove"
android:textColor="@color/colorPrimary"
android:visibility="gone" />
</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
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:text="Notification Interval"
android:textAlignment="center"
android:paddingStart="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:text="Notification Interval"
android:textAlignment="center" />
<CheckBox
android:id="@+id/interval_on_check"
android:text="On opening/closing"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="On opening/closing" />
<CheckBox
android:id="@+id/interval_15_check"
android:text="15 minutes before"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="15 minutes before" />
<CheckBox
android:id="@+id/interval_30_check"
android:text="30 minutes before"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="30 minutes before" />
<CheckBox
android:id="@+id/interval_hour_check"
android:text="An hour before"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="An hour before" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="srct.whatsopen.views.activities.MainActivity">
<LinearLayout
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<include
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
android:id="@+id/tabs"
app:pstsShouldExpand="true"
android:layout_width="match_parent"
android:layout_height="48dp"
app:pstsIndicatorColor="@color/colorPrimary"
app:pstsIndicatorHeight="6dp"
app:pstsTabBackground="@drawable/button_bg"
android:layout_width="match_parent"
android:layout_height="48dp"/>
app:pstsShouldExpand="true"
app:pstsTabBackground="@drawable/button_bg" />
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"/>
android:background="@android:color/white" />
</LinearLayout>
<fr.castorflex.android.circularprogressbar.CircularProgressBar
<ProgressBar
android:id="@+id/progress_bar"
android:indeterminate="true"
android:visibility="gone"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cpb_color="@color/colorPrimary"
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"/>
android:visibility="gone" />
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swipe_container"
android:layout_width="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"
tools:context="srct.whatsopen.views.fragments.FacilityListFragment">
......
......@@ -4,31 +4,26 @@
android:layout_width="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_height="wrap_content"
android:elevation="1dp"
android:layout_margin="6dp">
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:text="Notification Type"
android:paddingStart="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:text="Notification Type" />
<View
android:layout_width="fill_parent"
......@@ -37,41 +32,33 @@
<CheckBox
android:id="@+id/type_opening_check"
android:text="Opening"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="Opening" />
<CheckBox
android:id="@+id/type_closing_check"
android:text="Closing"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="Closing" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="1dp"
android:layout_margin="6dp">
<LinearLayout
android:orientation="vertical"
android:padding="8dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:text="Notification Interval"
android:paddingStart="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:paddingStart="2dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:text="Notification Interval" />
<View
android:layout_width="fill_parent"
......@@ -80,69 +67,68 @@
<CheckBox
android:id="@+id/interval_on_check"
android:text="On opening/closing"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="On opening/closing" />
<CheckBox
android:id="@+id/interval_15_check"
android:text="15 minutes before"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="15 minutes before" />
<CheckBox
android:id="@+id/interval_30_check"
android:text="30 minutes before"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="30 minutes before" />
<CheckBox
android:id="@+id/interval_hour_check"
android:text="An hour before"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:text="An hour before" />
</LinearLayout>
</android.support.v7.widget.CardView>
<RelativeLayout
android:padding="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/save_button"
android:text="Save"
android:textColor="@color/colorPrimary"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:padding="4dp">
<Button
android:id="@+id/cancel_button"
android:text="Cancel"
android:textColor="@color/colorPrimary"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/remove_button"
android:layout_toStartOf="@+id/remove_button"
android:text="Cancel"
android:textColor="@color/colorPrimary" />
<Button
android:id="@+id/remove_button"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/save_button"
android:layout_toStartOf="@+id/save_button"
android:text="Remove"
android:textColor="@color/colorPrimary"
android:layout_toRightOf="@id/save_button"
android:layout_toEndOf="@id/save_button"
android:layout_toStartOf="@id/cancel_button"
android:layout_toLeftOf="@id/cancel_button"
android:visibility="gone"
android:visibility="gone" />
<Button
android:id="@+id/save_button"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="Save"
android:textColor="@color/colorPrimary" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<?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_height="wrap_content"
android:elevation="2dp">
android:layout_height="72dp"
android:orientation="horizontal">
<LinearLayout android:id="@+id/text_layout"
android:paddingTop="15dp"
android:paddingBottom="15dp"
<LinearLayout
android:id="@+id/text_layout"
android:layout_width="0dp"
android:orientation="vertical"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackground"
android:layout_weight="1">
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">