本文整理汇总了Java中android.view.InflateException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java InflateException.printStackTrace方法的具体用法?Java InflateException.printStackTrace怎么用?Java InflateException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.InflateException
的用法示例。
在下文中一共展示了InflateException.printStackTrace方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initInflate
import android.view.InflateException; //导入方法依赖的package包/类
protected void initInflate(Context context) {
try {
View.inflate(context, getLayoutId(), this);
} catch (InflateException e) {
if (e.toString().contains("GSYImageCover")) {
Debuger.printfError("********************\n" +
"***** 注意 *****" +
"********************\n" +
"*该版本需要清除布局文件中的GSYImageCover\n" +
"**** Attention ***\n" +
"*Please remove GSYImageCover from Layout in this Version\n" +
"********************\n");
e.printStackTrace();
throw new InflateException("该版本需要清除布局文件中的GSYImageCover,please remove GSYImageCover from your layout");
} else {
e.printStackTrace();
}
}
}
示例2: onCreateView
import android.view.InflateException; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Log.i(CommonUtility.MAP_FRAG_TAG, "onCreateView");
try {
Log.i(CommonUtility.MAP_FRAG_TAG, "Inflated");
rootView = inflater.inflate(R.layout.location_fragment, container,
false);
} catch (InflateException e) {
e.printStackTrace();
} catch (Exception exc) {
exc.printStackTrace();
}
return rootView;
}
示例3: onCreateView
import android.view.InflateException; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (group != null) {
ViewGroup parent = (ViewGroup) group.getParent();
if (parent != null)
parent.removeView(group);
}
try {
group = (ViewGroup) inflater.inflate(
R.layout.layout_fragment_friends, container, false);
locationPlace = (TextView) group.findViewById(R.id.place_name_text);
reminderTo = (TextView) group.findViewById(R.id.reminder_to);
} catch (InflateException e) {
e.printStackTrace();
}
return group;
}
示例4: onCreateViewHolder
import android.view.InflateException; //导入方法依赖的package包/类
@Override
public SupportedOrderViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
SupportedOrderViewHolder viewHolder = null;
try {
View layoutView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.cardview_supported_order, null);
viewHolder = new SupportedOrderViewHolder(layoutView);
} catch (InflateException e) {
e.printStackTrace();
}
return viewHolder;
}
示例5: onCreateView
import android.view.InflateException; //导入方法依赖的package包/类
/**
* This method is called when the view is being created as part of the Android activity lifecycle
* @param inflater
* @param container
* @param savedInstanceState
* @return
*/
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Check if we have created the view already, if we haven't create it.
if (view != null) {
ViewGroup parent = (ViewGroup) view.getParent();
if (parent != null) {
parent.removeView(view);
}
}
try {
view = inflater.inflate(R.layout.fragment_record_activity, container, false);
} catch (InflateException e) {
e.printStackTrace();
}
startButton = (Button) view.findViewById(R.id.startButton);
pauseButton = (Button) view.findViewById(R.id.pauseButton);
resumeButton = (Button) view.findViewById(R.id.resumeButton);
finishButton = (Button) view.findViewById(R.id.finishButton);
clearButton = (Button) view.findViewById(R.id.clearButton);
startButton.setOnClickListener(startButtonListener);
pauseButton.setOnClickListener(pauseButtonListener);
resumeButton.setOnClickListener(resumeButtonListener);
finishButton.setOnClickListener(finishButtonListener);
clearButton.setOnClickListener(clearButtonListener);
buildGoogleApiClient();
SupportMapFragment mSupportMapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
mSupportMapFragment.getMapAsync(this);
Log.i("Development", "onCreateView");
return view; // We must return the loaded Layout
}
示例6: ItemBuilder
import android.view.InflateException; //导入方法依赖的package包/类
public ItemBuilder(Context context, ViewGroup parent, int layoutId) {
mContext = context;
mViews = new SparseArray<View>();
try {
mConvertView = LayoutInflater.from(mContext).inflate(layoutId, parent, false);
mConvertView.setTag(this);
} catch (InflateException e) {
e.printStackTrace();
}
mLayoutId = layoutId;
}
示例7: getView
import android.view.InflateException; //导入方法依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
try{
convertView = LayoutInflater.from(context).inflate(R.layout.griditem_group, null);
ImageView ivIcon = (ImageView) convertView.findViewById(R.id.imageViewIcon);
ImageView ivMarker = (ImageView) convertView.findViewById(R.id.imageViewMarker);
TextView tvLabel = (TextView) convertView.findViewById(R.id.textViewLabel);
TextView tvPadding = (TextView) convertView.findViewById(R.id.textViewPadding);
tvLabel.setText((String)getItem(position));
//ivIcon.setImageBitmap(new GroupPreferences(context).getGroupBitmapByPriority((int)getItemId(position)));
ivIcon.setImageResource(new GroupPreferences(context).getGroupResIDByPriority((int)getItemId(position)));
ivMarker.setVisibility(View.INVISIBLE);
((TextView) convertView.findViewById(R.id.textViewPadding)).setVisibility(View.INVISIBLE);
int padding = (int) (parent.getMeasuredHeight()/GRID_COLUMNS
- parent.getMeasuredWidth()/GRID_COLUMNS
- tvLabel.getTextSize()
- tvPadding.getTextSize()
);
Log.i(this.getClass().getName(), parent.getMeasuredHeight()+"/"+parent.getMeasuredWidth()+","
+tvLabel.getTextSize()+"/"+tvPadding.getTextSize()+","+padding);
if(padding < 0){
padding = 0;
}
( convertView.findViewById(R.id.textViewPadding)).setPadding(0, padding/2, 0, 0);
tvLabel.setPadding(2, 0, 2, padding/2);
}
catch(InflateException e){
e.printStackTrace();
}
return convertView;
}
示例8: getView
import android.view.InflateException; //导入方法依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
try {
convertView = inflater.inflate( R.layout.list_item_caption, parent, false);
} catch (InflateException e) {
e.printStackTrace();
return null;
}
}
TextView time = (TextView) convertView.findViewById(R.id.caption_time);
TextView text = (TextView) convertView.findViewById(R.id.caption_text);
if (time == null || text == null) {
// Have seen some inexplicable NPEs somewhere in this method (line
// number reads 368, which was the last line of this file.)
return convertView;
}
Caption caption = getItem(position);
if (caption != null) {
time.setText(caption.getTime_string());
text.setText(caption.getText());
} else {
time.setText("");
text.setText("");
}
return convertView;
}