本文整理汇总了Java中com.odoo.core.utils.OControls.setGone方法的典型用法代码示例。如果您正苦于以下问题:Java OControls.setGone方法的具体用法?Java OControls.setGone怎么用?Java OControls.setGone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.odoo.core.utils.OControls
的用法示例。
在下文中一共展示了OControls.setGone方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPostExecute
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
OControls.setGone(getContainer(), R.id.productLoadingLayout);
OControls.setVisible(getContainer(), R.id.productLayout);
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
bindProduct();
}
});
return null;
}
}.execute();
}
示例2: generateView
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
private void generateView(View view, OUser user) {
OControls.setText(view, R.id.accountName, user.getName());
OControls.setText(view, R.id.accountURL, (user.isOAuthLogin()) ? user.getInstanceURL() : user.getHost());
OControls.setImage(view, R.id.profile_image, R.drawable.avatar);
if (!user.getAvatar().equals("false")) {
Bitmap bmp = BitmapUtils.getBitmapImage(this, user.getAvatar());
if (bmp != null)
OControls.setImage(view, R.id.profile_image, bmp);
}
if (user.isActive()) {
OControls.setVisible(view, R.id.btnLogout);
OControls.setGone(view, R.id.btnLogin);
} else {
OControls.setGone(view, R.id.btnLogout);
OControls.setVisible(view, R.id.btnLogin);
}
view.findViewById(R.id.btnLogin).setTag(user);
view.findViewById(R.id.btnLogout).setTag(user);
view.findViewById(R.id.btnRemoveAccount).setTag(user);
view.findViewById(R.id.btnLogout).setOnClickListener(this);
view.findViewById(R.id.btnLogin).setOnClickListener(this);
view.findViewById(R.id.btnRemoveAccount).setOnClickListener(this);
}
示例3: getView
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup parent) {
ODataRow row = (ODataRow) chatterItems.get(position);
if (row.getString("subtype_id").equals("false")) {
view.setBackgroundResource(R.color.base_chatter_view_note_background);
} else {
view.setBackgroundColor(Color.WHITE);
}
view.findViewById(R.id.imgAttachments).setVisibility(
(row.getBoolean("has_attachments")) ?
View.VISIBLE :
View.GONE
);
if (row.getString("subject").equals("false")) {
OControls.setGone(view, R.id.chatterSubject);
} else {
OControls.setVisible(view, R.id.chatterSubject);
OControls.setText(view, R.id.chatterSubject, row.getString("subject"));
}
String date = ODateUtils.convertToDefault(row.getString("date"),
ODateUtils.DEFAULT_FORMAT, "MMM dd hh:mm a");
OControls.setText(view, R.id.chatterDate, date);
OControls.setText(view, R.id.chatterBody, StringUtils.htmlToString(row.getString("body")));
OControls.setText(view, R.id.chatterAuthor, row.getString("author_name"));
String author_image = mailMessage.getAuthorImage(row.getInt(OColumn.ROW_ID));
if (!author_image.equals("false")) {
Bitmap author = BitmapUtils.getBitmapImage(mContext, author_image);
OControls.setImage(view, R.id.authorImage, author);
} else {
OControls.setImage(view, R.id.authorImage, R.drawable.avatar);
}
view.setTag(row);
view.setOnClickListener(this);
return view;
}
示例4: init
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
private void init() {
recordName = (TextView) findViewById(R.id.recordName);
parent = (View) recordName.getParent();
ODataRow row = mailMessage.browse(extra.getInt(OColumn.ROW_ID));
attachments.addAll(row.getM2MRecord("attachment_ids").browseEach());
if (attachments.size() > 0) {
loadAttachments = new LoadAttachments();
loadAttachments.execute();
}
horizontalScrollView = (LinearLayout) findViewById(R.id.attachmentsList);
baseModel = OModel.get(this, row.getString("model"), mailMessage.getUser().getAndroidName());
ODataRow record = baseModel.browse(baseModel.selectRowId(row.getInt("res_id")));
String name = record.getString(baseModel.getDefaultNameColumn());
recordName.setText(name);
recordName.setBackgroundColor(OStringColorUtil.getStringColor(this, name));
if (!row.getString("subject").equals("false"))
OControls.setText(parent, R.id.messageSubject, row.getString("subject"));
else
OControls.setGone(parent, R.id.messageSubject);
WebView messageBody = (WebView) findViewById(R.id.messageBody);
messageBody.setBackgroundColor(Color.TRANSPARENT);
messageBody.loadData(row.getString("body"), "text/html; charset=UTF-8", "UTF-8");
Bitmap author_image = BitmapUtils.getAlphabetImage(this, row.getString("author_name"));
String author_img = mailMessage.getAuthorImage(row.getInt(OColumn.ROW_ID));
if (!author_img.equals("false")) {
author_image = BitmapUtils.getBitmapImage(this, author_img);
}
OControls.setImage(parent, R.id.author_image, author_image);
OControls.setText(parent, R.id.authorName, row.getString("author_name"));
String date = ODateUtils.convertToDefault(row.getString("date"),
ODateUtils.DEFAULT_FORMAT, "MMM dd, yyyy hh:mm a");
OControls.setText(parent, R.id.messageDate, date);
}
示例5: run
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
@Override
public void run() {
OControls.setGone(mView, R.id.loadingProgress);
OControls.setGone(mView, R.id.swipe_container);
OControls.setVisible(mView, R.id.customer_no_items);
setHasSwipeRefreshView(mView, R.id.customer_no_items, Customers.this);
OControls.setImage(mView, R.id.icon, R.drawable.ic_action_customers);
OControls.setText(mView, R.id.title, _s(R.string.label_no_customer_found));
OControls.setText(mView, R.id.subTitle, "");
}
示例6: generateView
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
private View generateView(String title, int res_id) {
View view = LayoutInflater.from(this).inflate(R.layout.base_drawer_account_item,
mDrawerAccountContainer, false);
OControls.setGone(view, R.id.profile_url_text);
ImageView icon = (ImageView) view.findViewById(R.id.profile_image);
icon.setImageResource(res_id);
icon.setColorFilter(OResource.color(this, R.color.body_text_2));
TextView name = (TextView) view.findViewById(R.id.profile_name_text);
name.setTypeface(name.getTypeface(), Typeface.BOLD);
name.setText(title);
return view;
}
示例7: onPreExecute
import com.odoo.core.utils.OControls; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
OControls.setGone(getContainer(), R.id.productLayout);
OControls.setVisible(getContainer(), R.id.productLoadingLayout);
}