This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addressView.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
| getWindow().setStatusBarColor( | |
| ContextCompat.getColor(this, R.color.fandango)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="Theme.AppCompat.Light.NoActionBar"> | |
| <item name="windowNoTitle">true</item> | |
| <item name="windowActionBar">false</item> | |
| <item name="android:windowFullscreen">true</item> | |
| <item name="android:windowContentOverlay">@null</item> | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ArgbEvaluator argbEvaluator = new ArgbEvaluator(); | |
| @Override | |
| public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { | |
| if (position < pageAdapter.getCount() - 1) { | |
| Integer evaluate = (Integer) argbEvaluator.evaluate(positionOffset, | |
| ContextCompat.getColor(MainActivity.this, NavigationTabAdapter.TAB_COLORS[position]), | |
| ContextCompat.getColor(MainActivity.this, NavigationTabAdapter.TAB_COLORS[position + 1])); | |
| tabLayout.setBackgroundColor(evaluate); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| attendanceCardRecycler.setNestedScrollingEnabled(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <resources> | |
| <!-- Base application theme. --> | |
| <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| <!-- ..... --> | |
| <item name="android:dialogTheme">@style/CustomDialog</item> | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @OnClick(R.id.checkin_button) | |
| public void onCheckinClick() { | |
| if (checkinDone) { | |
| return; | |
| } | |
| if (!checkinEnabled) { | |
| if (attendance == null) { | |
| Toast.makeText(context, R.string.checkin_not_possible, Toast.LENGTH_SHORT).show(); | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public void onResume() { | |
| super.onResume(); | |
| getDialog().getWindow().setLayout(getResources().getDimensionPixelSize(R.dimen.dialog_fragment_width), ViewGroup.LayoutParams.WRAP_CONTENT); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Receives a {@link Completable} and returns a {@link Single<Boolean>} that emits <code>true</code> | |
| * if the <code>Completable</code> completes successful, <code>false</code> otherwise. | |
| * An action to be performed in case or error can also be passed through the argument | |
| * <code>exceptionConsumer</code>. | |
| * | |
| * @param completable The input {@link Completable} | |
| * @param exceptionConsumer A consumer to process the exception (eg log it) in case the {@link Completable} | |
| * terminates with an error. | |
| * @return The {@link Single<Boolean>}, as described above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Creates an {@link Observable} that emits all lines of a {@link BufferedReader} as {@link String}s. | |
| * | |
| * @param reader The {@link BufferedReader} to read from | |
| * @return An {@link Observable} that emits {@link String}s. | |
| */ | |
| public static Observable<String> fromBufferedReader(BufferedReader reader) { | |
| return Observable.create(e -> { | |
| String line; | |
| while (!e.isDisposed() && (line = reader.readLine()) != null) { |