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 GPSTracker extends Service implements LocationListener { | |
private Context mContext; | |
private Activity mActivity; | |
// flag for GPS status | |
boolean isGPSEnabled = false; |
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 MapsNearbyActivity extends AppCompatActivity implements OnMapReadyCallback { | |
private GoogleMap mMap; | |
private Member mMember; | |
private GPSTracker gps; | |
private double mLong, mLat; | |
@BindView(R.id.toolbar) |
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 VerticalAdapter(List<Object> items, Context context) { | |
mValues = items; | |
mContext = context; | |
} | |
@Override | |
public void onBindViewHolder(final ViewHolder holder, int position) { | |
//Don't forget to clear | |
holder.mListPhoto.clear(); |
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
@SuppressLint("ValidFragment") | |
public static class BottomDialogFragment extends BottomSheetDialogFragment { | |
public static BottomDialogFragment getInstance() { | |
return new BottomDialogFragment(); | |
} | |
@Nullable | |
@Override | |
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
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 SectionsPagerAdapter extends FragmentPagerAdapter { | |
private final List<Fragment> mFragmentList = new ArrayList<>(); | |
private final List<String> mFragmentTitleList = new ArrayList<>(); | |
public SectionsPagerAdapter(FragmentManager manager) { | |
super(manager); | |
} | |
@Override |
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
final AlertDialog dialogBuilder = new AlertDialog.Builder(this).create(); | |
LayoutInflater inflater = this.getLayoutInflater(); | |
View dialogView = inflater.inflate(R.layout.custom_dialog, null); | |
final EditText editText = (EditText) dialogView.findViewById(R.id.edt_comment); | |
Button button1 = (Button) dialogView.findViewById(R.id.buttonSubmit); | |
Button button2 = (Button) dialogView.findViewById(R.id.buttonCancel); | |
button2.setOnClickListener(new View.OnClickListener() { | |
@Override |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
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" | |
android:orientation="vertical" | |
tools:context=".MainActivity"> | |
<android.support.v7.widget.Toolbar |
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 MainActivity extends AppCompatActivity { | |
@BindView(R.id.videoView) | |
VideoView mVideoView; | |
@BindView(R.id.progrss) | |
ProgressBar progressBar; | |
@BindView(R.id.btn_play) | |
ImageButton mPlay; |
OlderNewer