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
/*** | |
* USAGE: | |
* DataManager.getInstance().setItemsList(itemsList); | |
* | |
* Item item = DataManager.getInstance().getItemByIdx(5); | |
* | |
* Please, notice that the getItemByIdx() function my throw an exception!!! | |
*/ | |
public class DataManager { | |
private static DataManager ourInstance = new DataManager(); |
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
/** | |
* Created by todor.kostov on 6/25/2016. | |
*/ | |
public interface AsyncResponse { | |
void processFinish(String output); | |
} |
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
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
#parse("File Header.java") | |
public class ${NAME} extends AppCompatActivity { | |
private static final String TAG = ${NAME}.class.getSimpleName(); | |
/** |
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
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
#parse("File Header.java") | |
public class ${NAME} extends AppCompatActivity { | |
private static final String TAG = ${NAME}.class.getSimpleName(); | |
/** |
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
for(int i=0; i < mTabLayout.getTabCount(); i++) { | |
View tab = ((ViewGroup) mTabLayout.getChildAt(0)).getChildAt(i); | |
ViewGroup.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) tab.getLayoutParams(); | |
p.setMargins(0, 0, 50, 0); | |
tab.requestLayout(); | |
} |
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
File path = new File("path\to\your\folder"); | |
File file= new File(path,".nomedia"); | |
if (!file.exists()) { | |
try { | |
file.createNewFile(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} |
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
productFlavors { | |
newYorkTimes { | |
applicationId "com.nyt.rss" | |
buildConfigField 'String', 'HOST', '"http://nytimes.com"' | |
} | |
theGuardian { | |
applicationId "com.theguardian.rss" | |
buildConfigField 'String', 'HOST', '"http://theguardian.com"' |
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
productFlavors { | |
newYorkTimes { | |
... | |
} | |
theGuardian { | |
... | |
} |
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
import com.google.android.gms.location.Geofence; | |
import com.google.android.gms.maps.model.LatLng; | |
/** | |
* Just a dummy container class in order to | |
* collect {@link com.google.android.gms.location.Geofence} | |
* and {@link com.google.android.gms.maps.model.LatLng} in one entity | |
*/ | |
public class CompanyLocation { |
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
import android.graphics.Color; | |
import android.location.Location; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
import com.google.android.gms.maps.CameraUpdateFactory; | |
import com.google.android.gms.maps.GoogleMap; | |
import com.google.android.gms.maps.OnMapReadyCallback; | |
import com.google.android.gms.maps.SupportMapFragment; | |
import com.google.android.gms.maps.model.BitmapDescriptorFactory; |
OlderNewer