Skip to content

Commit 2fec8ce

Browse files
misc
1 parent 88ca7fc commit 2fec8ce

File tree

5 files changed

+106
-26
lines changed

5 files changed

+106
-26
lines changed

app/src/main/java/com/haayhappen/clockplus/BaseFragment.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,4 @@ public void onDestroyView() {
5555
super.onDestroyView();
5656
ButterKnife.unbind(this); // Only for fragments!
5757
}
58-
59-
/**
60-
* Callback invoked when this Fragment is part of a ViewPager and it has been
61-
* selected, as indicated by {@link android.support.v4.view.ViewPager.OnPageChangeListener#onPageSelected(int)
62-
* onPageSelected(int)}.
63-
*/
64-
public void onPageSelected() {
65-
// TODO: Consider making this abstract. The reason it wasn't abstract in the first place
66-
// is not all Fragments in our ViewPager need to do things upon being selected. As such,
67-
// those Fragments' classes would just end up stubbing this implementation.
68-
}
6958
}

app/src/main/java/com/haayhappen/clockplus/MainActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ protected void onNewIntent(Intent intent) {
8181
@Override
8282
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
8383
if (requestCode == REQUEST_CODE_PICK_LOCATION) {
84-
locationPicker.onLocationPicked(PlacePicker.getPlace(this, data));
84+
if (data != null) {
85+
locationPicker.onLocationPicked(PlacePicker.getPlace(this, data));
86+
}
8587
}
8688

8789

@@ -168,5 +170,4 @@ public boolean onOptionsItemSelected(MenuItem item) {
168170
return super.onOptionsItemSelected(item);
169171
}
170172

171-
172173
}

app/src/main/java/com/haayhappen/clockplus/alarms/ui/ExpandedAlarmViewHolder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public void processFinish(String output) {
303303
duration.setText(output);
304304
}
305305
});
306-
306+
307307
if (!fromText.getText().equals("") && !toText.getText().equals("")) {
308308
try {
309309
asyncTask.execute(fromText.getText().toString(), toText.getText().toString());
@@ -350,6 +350,7 @@ private void bindClearFrom(Alarm alarm) {
350350

351351
private void bindTo(Alarm alarm) {
352352
toText.setText(alarm.destination().getAdress());
353+
setDuration();
353354
}
354355

355356
private void bindClearTo(Alarm alarm) {

app/src/main/res/layout/item_collapsed_alarm.xml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- Wrapped in a LL so the divider is full width.
1818
The RelativeLayout defines padding for all children, so the
1919
divider would be padded too. -->
20-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
20+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2121
android:layout_width="match_parent"
2222
android:layout_height="wrap_content"
2323
android:background="?selectableItemBackground"
@@ -27,6 +27,8 @@
2727
AlarmCountdown needing to be anchored to the left of
2828
the label. -->
2929
<RelativeLayout
30+
android:id="@+id/rl"
31+
3032
android:layout_width="match_parent"
3133
android:layout_height="wrap_content"
3234
android:paddingEnd="@dimen/item_padding_end"
@@ -71,23 +73,27 @@
7173
android:paddingEnd="@dimen/button_text_right_padding"
7274
android:text="@string/dismiss_now" />
7375

74-
<ImageView
75-
android:layout_width="wrap_content"
76-
android:layout_height="wrap_content"
77-
android:layout_alignBottom="@id/recurring_days"
78-
android:layout_alignParentEnd="true"
79-
android:src="@drawable/ic_chevron_down"
80-
android:clickable="false"
81-
android:focusable="false"
82-
android:background="@android:color/transparent"
83-
android:padding="8dp" />
76+
8477

8578
</RelativeLayout>
8679

8780
<View
81+
android:layout_below="@id/rl"
8882
style="@style/Divider.Horizontal"
8983
android:layout_marginTop="@dimen/item_margin_between_elements"
9084
android:layout_marginStart="16dp"
9185
android:layout_marginEnd="16dp"/>
9286

93-
</LinearLayout>
87+
<ImageView
88+
android:layout_marginEnd="16dp"
89+
android:layout_width="wrap_content"
90+
android:layout_height="wrap_content"
91+
android:layout_alignBottom="@id/rl"
92+
android:layout_alignParentEnd="true"
93+
android:src="@drawable/ic_chevron_down"
94+
android:clickable="false"
95+
android:focusable="false"
96+
android:background="@android:color/transparent"
97+
android:padding="8dp" />
98+
99+
</RelativeLayout>

graphics/vertical_two_dot.svg

Lines changed: 83 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)