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
layout.xml: | |
<ProgressBar | |
android:id="@+id/pb_loading" | |
style="@style/ListSpinner" | |
android:layout_centerInParent="true" /> | |
styles.xml: | |
<style name="Spinner"> |
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
URI uri = UriBuilder.create() | |
.queryParam("method", "user.authorize") | |
.queryParam("email", email) | |
.queryParam("password", password) | |
.build(); | |
JsonNode result = get(uri); | |
User user = readValue(mObjectMapper, result.get("user"), User.class); |
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 Request { | |
private String id = "null"; | |
private String method = ""; | |
private RequestParams params = new RequestParams(); | |
public String getId() { | |
return id; | |
} | |
public String getMethod() { |
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
Request request = new Request(); | |
request.setMethod("user.authorize") | |
.addParam("email", "email@email.com") | |
.addParam("password", "111111") | |
.addParam("ids", new String[]{"1", "2", "3"}); |
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
db.execSQL("CREATE TABLE " + RosterConstants.TABLE_ROSTER + " (" | |
+ RosterConstants._ID | |
+ " INTEGER PRIMARY KEY AUTOINCREMENT, " | |
+ RosterConstants.JID + " TEXT UNIQUE ON CONFLICT REPLACE, " | |
+ RosterConstants.ALIAS + " TEXT, " | |
+ RosterConstants.STATUS_MODE + " INTEGER, " | |
+ RosterConstants.AVATAR_160 + " TEXT, " | |
+ RosterConstants.GROUP + " TEXT);"); |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<solid android:color="#ff0000" /> | |
</shape> | |
</item> | |
<item android:bottom="1dp"> | |
<shape android:shape="rectangle"> | |
<solid android:color="@color/white" /> |
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"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:drawable="@drawable/btn_digit_circle_pressed_bg" android:state_pressed="true" /> | |
<!-- pressed --> | |
<item android:drawable="@drawable/btn_digit_circle_default_bg" /> | |
<!-- default --> | |
</selector> |
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 WorldPhotoStreamAdapter extends ArrayAdapter<Photo> { | |
private LayoutInflater mInflater; | |
private int photoWidth; | |
private int photoHeight; | |
private float scale; | |
public WorldPhotoStreamAdapter(Context context, int textViewResourceId) { | |
super(context, textViewResourceId); | |
mInflater = LayoutInflater.from(context); | |
final int widthPx = context.getResources().getDisplayMetrics().widthPixels; |
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 com.example; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.util.SparseIntArray; | |
import android.view.ViewGroup; |
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
{"meta":{"error_type":"OAuthException","code":400,"error_message":"The access_token provided is invalid."}} - invalid token, i.e. user revoked access for brndstr app | |
{"meta":{"error_type":"OAuthParameterException","code":400,"error_message":"The access_token provided is invalid."}} | |
{"meta":{"code": 400, "error_type": "APICommentTooLongError", "error_message": "Your comment is too long."}} - comment too long | |
{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot view this resource"}} - privacy | |
{"meta":{"error_type":"APIInvalidParametersError","code":400,"error_message":"please supply action=approve,ignore,follow,block,unblock,unfollow"}} - sending params via GET instead of POST | |
{"meta":{"error_type":"APISubscriptionError","code":400,"error_message":"Invalid response"}} - don't know | |
{"meta":{"error_type":"APIError","code":400,"error_message":"Client request limit reached"}} | |
OlderNewer