use of com.androidquery.simplefeed.PQuery in project simplefacebook by androidquery.
the class BaseActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
makeHandle();
aq = new PQuery(this);
//aq.hardwareAccelerated11();
aq2 = new PQuery(this);
transformer = new PTransformer();
initView();
init(savedInstanceState);
if (isTaskRoot()) {
MarketService ms = new MarketService(this);
ms.level(MarketService.MINOR).checkVersion();
}
}
use of com.androidquery.simplefeed.PQuery in project simplefacebook by androidquery.
the class BaseFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(getContainerView(), container, false);
act = (BaseActivity) getActivity();
aq = new PQuery(act, view);
aq2 = new PQuery(act, view);
locale = act.locale;
handle = act.handle;
transformer = act.transformer;
return view;
}
use of com.androidquery.simplefeed.PQuery in project simplefacebook by androidquery.
the class SettingsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.settings);
aq = new PQuery(this);
handle = AppUtility.makeHandle(this);
initView();
}
use of com.androidquery.simplefeed.PQuery in project simplefacebook by androidquery.
the class CommentFragment method renderNote.
private void renderNote(FeedItem item) {
PQuery aq = super.aq.id(header).find(R.id.note_box);
Entity from = item.getFrom();
aq.id(R.id.name).text(from.getName());
aq.id(R.id.subject).text(item.getSubject());
aq.id(R.id.meta).text(item.getCachedTime(System.currentTimeMillis()));
String tb = from.getTb();
aq.id(R.id.tb).image(tb, true, true, 0, R.drawable.ic_menu_report_image, null, AQuery.FADE_IN_NETWORK);
String body = item.getMessage();
body = patchImg(body);
AQUtility.debug("body", body);
WebView wv = aq.id(R.id.web).visible().getWebView();
wv.loadDataWithBaseURL(null, body, "text/html", "utf-8", null);
aq.id(R.id.content_box).gone();
renderCount();
}
use of com.androidquery.simplefeed.PQuery in project simplefacebook by androidquery.
the class CommentFragment method renderNormal.
private void renderNormal(FeedItem item) {
Entity from = item.getFrom();
String name = from.getName();
if (name == null) {
return;
}
if (act.isTablet()) {
aq.id(R.id.action_box).visible();
}
aq.id(R.id.list).visible();
PQuery aq = super.aq.id(header).find(R.id.normal_box);
aq.visible();
aq.id(R.id.name).text(name);
String desc = item.getDesc();
String subject = item.getSubject();
if (act.isTablet() && subject != null) {
desc = subject;
}
aq.id(R.id.desc).text(desc, BufferType.SPANNABLE, true);
if (maxLines) {
aq.getTextView().setMaxLines(2);
}
aq.id(R.id.meta).text(item.getCachedTime(System.currentTimeMillis()));
String tb = from.getTb();
aq.id(R.id.tb).image(tb, true, true, 0, R.drawable.ic_menu_report_image, null, AQuery.FADE_IN_NETWORK);
String contentTb = item.getContentTb();
String contentDesc = item.getContentDesc();
if (drawContent && (contentTb != null || contentDesc != null)) {
aq.id(R.id.content_box).visible();
int icon = 0;
if (contentTb != null) {
int tbw = item.getCTbWidth();
if (tbw == 0)
tbw = 90;
aq.id(R.id.content_tb).width(tbw, false).height(tbw / 2, false);
aq.tag(item);
aq.image(contentTb, true, true, 0, R.drawable.ic_menu_report_image, null, AQuery.FADE_IN_NETWORK, AQuery.RATIO_PRESERVE);
icon = item.getActionIcon();
aq.id(R.id.content_ph).visible();
} else {
aq.id(R.id.content_tb).clear().gone();
aq.id(R.id.content_ph).gone();
}
aq.id(R.id.content_action);
if (icon != 0) {
aq.visible().image(IconUtility.getCached(icon));
} else {
aq.gone();
}
aq.id(R.id.content_name).text(item.getContentName(), BufferType.SPANNABLE, true).tag(item);
aq.id(R.id.content_desc).text(contentDesc, BufferType.SPANNABLE, true);
aq.id(R.id.content_meta).text(item.getContentMeta(), BufferType.SPANNABLE, true);
} else {
aq.id(R.id.content_box).gone();
}
renderCount();
}
Aggregations