Skip to content

Commit

Permalink
Merge pull request #59 from futurice/develop
Browse files Browse the repository at this point in the history
Prepare for new release
  • Loading branch information
ninjahoahong authored Aug 14, 2017
2 parents 5fd480b + fa0beab commit beed7ec
Show file tree
Hide file tree
Showing 64 changed files with 827 additions and 1,067 deletions.
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,7 @@ android {
compile "com.github.paolorotolo:appintro:$rootProject.appintroVersion"
compile "com.android.support:support-v4:$rootProject.supportLibraryVersion"
compile "com.android.support:appcompat-v7:$rootProject.appCompatVesion"
compile "com.jakewharton:butterknife:$rootProject.butterknifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknifeVersion"
}
}
6 changes: 3 additions & 3 deletions app/src/androidTest/res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
Expand Down
9 changes: 4 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
<application
android:name=".ReservatorApplication"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@drawable/icon"
android:label="@string/app_name">
android:label="@string/app_name"
android:supportsRtl="true">
<activity
android:name=".LoginActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:noHistory="true"
android:screenOrientation="sensorLandscape"></activity>
android:screenOrientation="sensorLandscape" />
<!-- Hardware acceleration breaks the drawing of the vertices -->
<activity
android:name=".RoomActivity"
Expand All @@ -46,9 +48,6 @@
android:name=".LobbyActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="sensorLandscape" />
<activity
android:name=".view.RoomReservationPopup"
android:theme="@style/Theme.Transparent" />
<activity
android:name=".WizardActivity"
android:noHistory="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,32 @@
import java.util.List;
import java.util.Vector;

import butterknife.BindView;
import butterknife.ButterKnife;

public class LobbyActivity extends ReservatorActivity
implements OnMenuItemClickListener,
DataUpdatedListener, AddressBookUpdatedListener {
MenuItem settingsMenu, refreshMenu, aboutMenu;
LinearLayout container = null;
DataProxy proxy;
AddressBook ab;
int showLoadingCount = 0;

AlertDialog alertDialog;
private ProgressDialog progressDialog = null;
private boolean waitingAddresses = false;

@BindView(R.id.digitalClock1)
TextView clock;
@BindView(R.id.linearLayout1)
LinearLayout container;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.lobby_activity);
ab = this.getResApplication().getAddressBook();
TextView clock;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
clock = (TextClock) findViewById(R.id.digitalClock1);
} else {
clock = (DigitalClock) findViewById(
R.id.digitalClock1);
}
setContentView(R.layout.lobby_activity);
ButterKnife.bind(this);
ab = getResApplication().getAddressBook();
clock.setTypeface(
Typeface.createFromAsset(getAssets(), "fonts/EHSMB.TTF"));
}
Expand Down Expand Up @@ -119,7 +121,6 @@ protected Boolean isPrehensible() {

private void refreshRoomInfo() {
updateLoadingWindow(1);
container = (LinearLayout) findViewById(R.id.linearLayout1);
container.removeAllViews();
proxy.refreshRooms();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.futurice.android.reservator.common.PreferenceManager;
Expand All @@ -38,6 +39,9 @@
import java.util.Calendar;
import java.util.Vector;

import butterknife.BindView;
import butterknife.ButterKnife;

public class RoomActivity extends ReservatorActivity implements OnMenuItemClickListener,
DataUpdatedListener, AddressBookUpdatedListener {
public static final String ROOM_EXTRA = "room";
Expand All @@ -54,14 +58,22 @@ public void run() {
final int DEFAULT_BOOK_NOW_DURATION = 30; // mins
DataProxy proxy;
Room currentRoom;
WeekView weekView;
TextView roomNameLabel;
RoomTrafficLights trafficLights;

MenuItem settingsMenu, refreshMenu, aboutMenu;
AlertDialog alertDialog;
int showLoadingCount = 0;
private ProgressDialog progressDialog = null;

@BindView(R.id.weekView1)
WeekView weekView;
@BindView(R.id.roomNameLabel)
TextView roomNameLabel;
@BindView(R.id.roomTrafficLights)
RoomTrafficLights trafficLights;
@BindView(R.id.seeAllRoomsButton)
Button seeAllRoomsButton;


/**
* Helper for starting a RoomActivity
*
Expand All @@ -77,6 +89,9 @@ public static void startWith(Context context, Room room) {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.room_activity);
ButterKnife.bind(this);
initRoomActivity();
}

Expand Down Expand Up @@ -112,11 +127,6 @@ private void setRoom(Room r) {
}

private void initRoomActivity() {
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.room_activity);
this.weekView = (WeekView) findViewById(R.id.weekView1);
this.roomNameLabel = (TextView) findViewById(R.id.roomNameLabel);
this.trafficLights = (RoomTrafficLights) findViewById(R.id.roomTrafficLights);
try {
currentRoom = (Room) getIntent().getSerializableExtra(ROOM_EXTRA);
} catch (ClassCastException e) {
Expand All @@ -127,7 +137,7 @@ private void initRoomActivity() {
"No room found as Serializable extra " + ROOM_EXTRA);
}

findViewById(R.id.seeAllRoomsButton).setOnClickListener(
seeAllRoomsButton.setOnClickListener(
new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
Loading

0 comments on commit beed7ec

Please sign in to comment.