This file contains 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 class ProgressDialogFragment extends DialogFragment { | |
public final static String TITLE = "title"; | |
public final static String MESSAGE = "message"; | |
public final static String MAX = "max"; | |
public final static String CANCELABLE = "cancelable"; | |
public static ProgressDialogFragment newInstance() { | |
return new ProgressDialogFragment(); | |
} |
This file contains 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
import android.util.SparseArray; | |
import android.widget.AbsListView; | |
/** | |
* Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the | |
* position of child views. | |
*/ | |
public class ListViewScrollTracker { | |
private AbsListView mListView; | |
private SparseArray<Integer> mPositions; |
This file contains 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
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/gestures.dart'; | |
class PanAndScalingGestureRecognizer extends StatefulWidget { | |
final Widget child; | |
final void Function(Offset initialPoint) onPanStart; | |
final void Function(Offset initialPoint, Offset delta) onPanUpdate; | |
final void Function() onPanEnd; | |
final void Function(Offset initialFocusPoint) onScalingStart; |
This file contains 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
import 'package:advert_app/utils/logging.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:flutter/gestures.dart'; | |
class ScalingGestureDetector extends StatefulWidget { | |
final Widget child; | |
final void Function(Offset initialPoint) onPanStart; | |
final void Function(Offset initialPoint, Offset delta) onPanUpdate; | |
final void Function() onPanEnd; |