Search in sources :

Example 6 with Entity

use of com.androidquery.simplefeed.data.Entity in project simplefacebook by androidquery.

the class PostActivity method init.

@Override
protected void init(Bundle state) {
    Intent intent = getIntent();
    String message = "";
    photo = (File) intent.getSerializableExtra("photo");
    message = intent.getStringExtra("message");
    if (state != null) {
        if (photo == null) {
            photo = (File) state.getSerializable("photo");
        }
        if (message == null) {
            message = state.getString("message");
        }
        location = state.getParcelable("location");
        place = (Place) state.getSerializable("place");
        tags = (List<Entity>) state.getSerializable("tags");
    }
    entity = (Entity) intent.getSerializableExtra("entity");
    item = (FeedItem) intent.getSerializableExtra("item");
    initView(message);
    albumCheck(0);
}
Also used : Entity(com.androidquery.simplefeed.data.Entity) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent)

Example 7 with Entity

use of com.androidquery.simplefeed.data.Entity in project simplefacebook by androidquery.

the class FriendsActivity method doneClicked.

public void doneClicked(View view) {
    Intent result = new Intent();
    ArrayList<Entity> selects = getSelected();
    result.putExtra("selected", selects);
    AQUtility.debug("on stop", selects);
    setResult(RESULT_OK, result);
    finish();
}
Also used : Entity(com.androidquery.simplefeed.data.Entity) Intent(android.content.Intent)

Example 8 with Entity

use of com.androidquery.simplefeed.data.Entity in project simplefacebook by androidquery.

the class FriendsActivity method itemClicked.

public void itemClicked(AdapterView<?> parent, View view, int pos, long id) {
    Entity entity = getItem(view);
    if (entity == null)
        return;
    if (!selectable) {
        FeedActivity.start(this, entity);
    } else {
        //CheckBox box = (CheckBox) view;
        PQuery aq = aq2.recycle(view);
        aq.id(R.id.checkbox_select);
        boolean checked = aq.isChecked();
        aq.checked(!checked);
        entity.setChecked(!checked);
    }
}
Also used : Entity(com.androidquery.simplefeed.data.Entity) PQuery(com.androidquery.simplefeed.PQuery)

Example 9 with Entity

use of com.androidquery.simplefeed.data.Entity in project simplefacebook by androidquery.

the class MenuActivity method modeSelected.

public void modeSelected(AdapterView<?> parent, View view, int position, long id) {
    FeedMode[] modes = FeedMode.values();
    FeedMode item = modes[position];
    if (item.equals(currentMode)) {
        return;
    }
    if (FeedMode.NEWS.equals(item) || FeedMode.WALL.equals(item)) {
        Entity source = AppUtility.getDefaultSource(item);
        FeedActivity.startLaunch(this, source, item);
    } else {
        startMode(this, item.getHandler());
    }
}
Also used : Entity(com.androidquery.simplefeed.data.Entity) FeedMode(com.androidquery.simplefeed.enums.FeedMode)

Example 10 with Entity

use of com.androidquery.simplefeed.data.Entity in project simplefacebook by androidquery.

the class PostActivity method putTags.

private void putTags(Map<String, Object> params, List<Entity> tags) {
    if (tags == null || tags.size() == 0)
        return;
    List<String> ids = new ArrayList<String>();
    for (Entity tag : tags) {
        ids.add(tag.getId());
    }
    String value = TextUtils.join(",", ids);
    AQUtility.debug("tags", value);
    params.put("tags", value);
}
Also used : Entity(com.androidquery.simplefeed.data.Entity) ArrayList(java.util.ArrayList)

Aggregations

Entity (com.androidquery.simplefeed.data.Entity)15 PQuery (com.androidquery.simplefeed.PQuery)4 FeedMode (com.androidquery.simplefeed.enums.FeedMode)3 ArrayList (java.util.ArrayList)3 Intent (android.content.Intent)2 ActionBar (android.app.ActionBar)1 PendingIntent (android.app.PendingIntent)1 Uri (android.net.Uri)1 WebView (android.webkit.WebView)1 ArrayAdapter (android.widget.ArrayAdapter)1 FeedItem (com.androidquery.simplefeed.data.FeedItem)1 JSONArray (org.json.JSONArray)1 JSONObject (org.json.JSONObject)1