Skip to content

Instantly share code, notes, and snippets.

View amalChandran's full-sized avatar
💭
I may be slow to respond.

Amal Chandran amalChandran

💭
I may be slow to respond.
View GitHub Profile
@amalChandran
amalChandran / Map.java
Created January 13, 2017 04:51
How to Set Polyline fit to screen
public void onMapReady(GoogleMap googleMap) {
map.clear();
map = googleMap;
LatLng hcmus = new LatLng(Double.parseDouble(latitude1), Double.parseDouble(longitude1));
map.moveCamera(CameraUpdateFactory.newLatLngZoom(hcmus, 10));
originMarkers.add(map.addMarker(new MarkerOptions()
.title(mStudentObject.getAddress())
.position(hcmus)));
LatLng startMarker=new LatLng(Double.parseDouble(latitude1),Double.parseDouble(longitude1));
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:id="@+id/content_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
@amalChandran
amalChandran / 1_drawable_ic_hash_io16.xml
Created March 19, 2016 16:21 — forked from nickbutcher/1_drawable_ic_hash_io16.xml
Animated Stroke. The google I/O website this year (https://google.com/io) has some funky animated lettering. I especially liked the animated stroke around the letters and wondered how you might implement that on Android. Turns out that AnimatedVectorDrawable makes this very easy! Here's how it looks: https://twitter.com/crafty/status/71077957997…
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Google Inc.
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
@amalChandran
amalChandran / gist:51f6a0e32379d93263de
Last active September 15, 2015 15:37 — forked from ec84b4/gist:d56c00fb5fd2dfaf279b
recycler view header adapter
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
/**
* Created by khaled bakhtiari on 10/26/2014.
* <a href="http://about.me/kh.bakhtiari">
*/