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 com.google.gson.Gson | |
import com.google.gson.TypeAdapter | |
import com.google.gson.TypeAdapterFactory | |
import com.google.gson.reflect.TypeToken | |
import com.google.gson.stream.JsonReader | |
import com.google.gson.stream.JsonWriter | |
import com.google.gson.stream.JsonToken | |
import com.google.gson.stream.MalformedJsonException | |
class SuddenArrayTypeAdapterFactory : TypeAdapterFactory { |
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
... | |
<service android:name=".background.interceptor.HttpUnauthorizedJobIntentService" | |
android:permission="android.permission.BIND_JOB_SERVICE" | |
android:exported="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
<?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:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="ru.artzmb.solar.MainActivity"> | |
<ImageView |
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 { | |
public static class Shop { | |
public int id; | |
public String name; | |
public List<Coordinate> coordinates = new ArrayList<>(); | |
@Override | |
public String toString() { | |
String str = id + " (" + name + ") [ "; |
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
package codepath.com.recyclerviewfun; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Contact { | |
private String mName; | |
private boolean mOnline; | |
public Contact(String name, boolean online) { |
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
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
... | |
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item> | |
</style> |
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
try { | |
PackageInfo info = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0); | |
textViewVersion.setText(String.format("%s (%d)", info.versionName, info.versionCode)); | |
} catch (PackageManager.NameNotFoundException e) { | |
// Whatever | |
} |
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
JSONObject body; | |
try { | |
body = new JSONObject(new String(((TypedByteArray) ((RetrofitError) spiceException.getCause()).getResponse().getBody()).getBytes())); | |
} catch (JSONException e) { | |
e.printStackTrace(); | |
} |
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
<?php | |
// API access key from Google API's Console | |
define('API_ACCESS_KEY', 'Не палимся'); | |
$registrationIds = array("Не палимся"); | |
// prep the bundle | |
$msg = array | |
( |