当前位置: 首页>>代码示例>>Java>>正文


Java InflateException.printStackTrace方法代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:CarGuo,项目名称:GSYVideoPlayer,代码行数:20,代码来源:GSYVideoView.java

示例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;
}
 
开发者ID:levanlevi,项目名称:AgWeatherNet,代码行数:19,代码来源:MapFragment.java

示例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;
}
 
开发者ID:leomindez,项目名称:Geominders,代码行数:21,代码来源:FriendFragment.java

示例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;
}
 
开发者ID:NerdCats,项目名称:RoboCat,代码行数:14,代码来源:SupportedOrderAdapter.java

示例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
}
 
开发者ID:fwtrailsapp,项目名称:Android,代码行数:42,代码来源:RecordActivityFragment.java

示例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;
}
 
开发者ID:xzy2046,项目名称:FastValueHolder,代码行数:13,代码来源:ItemBuilder.java

示例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;
}
 
开发者ID:pku9104038,项目名称:apkstore_apk,代码行数:40,代码来源:MainGridAdapter.java

示例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;
}
 
开发者ID:concentricsky,项目名称:android-viewer-for-khan-academy,代码行数:31,代码来源:CaptionFragment.java


注:本文中的android.view.InflateException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。