Java Code Examples for com.lidroid.xutils.ViewUtils

The following examples show how to use com.lidroid.xutils.ViewUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: MarketAndroidApp   Source File: CartActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_cart);
    ViewUtils.inject(this);
    mContext = this;

    //从SharedPreferences中获取用户id
    uId = (Integer) SharedPreferencesUtil
            .get(mContext, "userInfo", "userId", 0);

    //初始化绑定控件
    init();

    //初始化数据
    initData();
}
 
Example 2
Source Project: QiQuYing   Source File: TuDetailActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mQuShiService = new JokeServiceImpl(this);
	if(App.currentUser != null) {
   		mUserId = App.currentUser.getId();
   	}
	mSharePopWindow = new SharePopWindow(this);
	mListView.setHaveScrollbar(false);
	mCommentAdapter = new CommentAdapter(this);
	mListView.setAdapter(mCommentAdapter);
	mListView.setOnFootLoadingListener(new OnFootLoadingListener() {
		@Override
		public void onFootLoading() {
			loadComments();
		}
	});
	initContent();
}
 
Example 3
Source Project: QiQuYing   Source File: UserCenterActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	init();
	initCheckBoxStatusAndSetListenner();
	UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
	    @Override
	    public void onUpdateReturned(int updateStatus,UpdateResponse updateInfo) {
	        switch (updateStatus) {
	        case UpdateStatus.Yes: // has update
	            UmengUpdateAgent.showUpdateDialog(UserCenterActivity.this, updateInfo);
	            break;
	        case UpdateStatus.No: // has no update
	            ToastUtils.showMessageInCenter(UserCenterActivity.this, "已是最新版本");
	            break;
	        case UpdateStatus.Timeout: // time out
	        	ToastUtils.showMessageInCenter(UserCenterActivity.this, "检测超时");
	            break;
	        }
	    }
	});
}
 
Example 4
Source Project: QiQuYing   Source File: QuShiDetailActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mQuShiService = new JokeServiceImpl(this);
	if(App.currentUser != null) {
   		mUserId = App.currentUser.getId();
   	}
	mSharePopWindow = new SharePopWindow(this);
	mListView.setHaveScrollbar(false);
	mCommentAdapter = new CommentAdapter(this);
	mListView.setAdapter(mCommentAdapter);
	mListView.setOnFootLoadingListener(new OnFootLoadingListener() {
		@Override
		public void onFootLoading() {
			loadComments();
		}
	});
	initQuShiContent();
}
 
Example 5
Source Project: android-open-project-demo   Source File: BitMapFragment.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater,
		@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.bitmap_fragment_view, container,
			false);
	ViewUtils.inject(this, view);
	adapter = new MyAdapter(getActivity());
	listView.setAdapter(adapter);
	
	bitmapUtils = new BitmapUtils(getActivity());
	bitmapUtils.configDefaultLoadingImage(R.drawable.ic_launcher);
       bitmapUtils.configDefaultLoadFailedImage(R.drawable.down);
       bitmapUtils.configDefaultBitmapConfig(Bitmap.Config.RGB_565);
       
       loadImgList("http://www.22mm.cc/");
	return view;
}
 
Example 6
Source Project: ImitateTaobaoApp   Source File: CreateOrderActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_create_order);
    ViewUtils.inject(this);

    showData();

    init();

}
 
Example 7
Source Project: ImitateTaobaoApp   Source File: LoginActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    ViewUtils.inject(this);

    initToolBar();
}
 
Example 8
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_shop_detail);
    ViewUtils.inject(this);
    initView();
    tvCommodity.setText("商品详情");
    //btnRightHead.setBackgroundResource(R.drawable.menu_com);

    getNetDatas();
    popuWindowDialog();

}
 
Example 9
Source Project: QiQuYing   Source File: QuShiActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mCategoryList.add("最新");
	mCategoryList.add("最热");
	mFragments = new ArrayList<Fragment>();
	initFragment();
}
 
Example 10
Source Project: QiQuYing   Source File: MeiTuActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mCategoryList.add("最新");
	mCategoryList.add("最热");
	mFragments = new ArrayList<Fragment>();
	initFragment();
}
 
Example 11
Source Project: QiQuYing   Source File: FindPwdActivity1.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mHint = getResources().getString(R.string.sms_timer);
	mSmsContent = new SmsContent(new Handler()); 
	//注册短信变化监听 
	this.getContentResolver().registerContentObserver(Uri.parse("content://sms/"), true, mSmsContent);
}
 
Example 12
Source Project: QiQuYing   Source File: MyCollectActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	if(App.currentUser != null) {
   		mUserId = App.currentUser.getId();
   	}
	mCollectDAO = new CollectDAO(this);
	init();
}
 
Example 13
Source Project: QiQuYing   Source File: FeedbackActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mUserService = new UserServiceImpl(this);
	mHandler = new ClassHandler(this);
}
 
Example 14
Source Project: QiQuYing   Source File: AllJokeActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	Log.e(TAG, "onCreate");
	ViewUtils.inject(this);
	mCategoryList.add("最新");
	mCategoryList.add("最热");
	mFragments = new ArrayList<Fragment>();
	initFragment();
}
 
Example 15
Source Project: QiQuYing   Source File: IndexActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	App.addActivity(this); // 在界面启动栈中加入该界面
	UmengUpdateAgent.update(this);   //友盟检查更新
	init();
	uploadDingOrCai();
}
 
Example 16
Source Project: QiQuYing   Source File: QuTuActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mCategoryList.add("最新");
	mCategoryList.add("最热");
	mFragments = new ArrayList<Fragment>();
	initFragment();
}
 
Example 17
Source Project: QiQuYing   Source File: LoginActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mTencent = App.mTencent;
	mEventHandler = new EventHandler(){
		@Override
		public void afterEvent(int event, int result, Object data) {
			ProgressDialogUtils.dismiss();
			if (result == SMSSDK.RESULT_COMPLETE) {
				// 回调完成
				if (event == SMSSDK.EVENT_GET_VERIFICATION_CODE) {
					// 获取验证码成功
					if(App.smsCodeRecode == null) {
						App.smsCodeRecode = new HashMap<String, Long>();
					}
					//记录已发送记录
					App.smsCodeRecode.put(mPhone, System.currentTimeMillis());
					Intent intent = new Intent(LoginActivity.this, CheckCodeActivity.class);
					intent.putExtra("phone", mPhone);
					intent.putExtra("password", mPassword);
					startActivityWithAnimation(intent);
				}
			} else {
				ToastUtils.showMessageInCenter(LoginActivity.this, "发送失败, 请重试");
			}
		}
	};
}
 
Example 18
Source Project: QiQuYing   Source File: CheckCodeActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mSmsContent = new SmsContent(new Handler()); 
	//注册短信变化监听 
	this.getContentResolver().registerContentObserver(Uri.parse("content://sms/"), true, mSmsContent);
	init();
}
 
Example 19
Source Project: QiQuYing   Source File: ImageShowActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	initBitmapUtils();
	String url = getIntent().getStringExtra("url");
	mBitmapUtils.display(mPhotoView, url);
}
 
Example 20
Source Project: AndJie   Source File: AddPicturePopup.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public void initPopView(View parent) {
	super.initPopView(parent);
	view = (View) JieApp.instance.getInflater().inflate(
			R.layout.item_pop_add_picture, null);
	ViewUtils.inject(this, view);
	initPopWindow(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
	startPop(Gravity.BOTTOM, 0, 0);
}
 
Example 21
Source Project: AndJie   Source File: TitleNavigate.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void initLayout() {
	context = getContext();
	view = LayoutInflater.from(context).inflate(R.layout.item_title_bar, null);
	ViewUtils.inject(this, view);
	RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
			RelativeLayout.LayoutParams.MATCH_PARENT,
			RelativeLayout.LayoutParams.WRAP_CONTENT);
	addView(view, params);
}
 
Example 22
Source Project: android-open-project-demo   Source File: HttpFragment.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater,
		@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.http_fragment_view, container,
			false);
	ViewUtils.inject(this, view);
	http = new HttpUtils();
	return view;
}
 
Example 23
Source Project: android-open-project-demo   Source File: DownFragment.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater,
		@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.down_fragment_view, container,
			false);
	ViewUtils.inject(this, view);
	http = new HttpUtils();
	return view;
}
 
Example 24
Source Project: android-open-project-demo   Source File: DbFragment.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater,
		@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.db_fragment_view, container,
			false);
	ViewUtils.inject(this, view);

	db = DbUtils.create(this.getActivity());
	// 创建方式有多个重载, 实际项目中可能选择这个 因为数据库升级,后期数据维护都用的到
	// DbUtils.create(context, dbDir, dbName, dbVersion, dbUpgradeListener)
	db.configDebug(true); // debug模式 会输入sql语句
	db.configAllowTransaction(true); // 允许事务
	return view;
}
 
Example 25
Source Project: QiQuYing   Source File: UpdateNickActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	init();
}
 
Example 26
Source Project: QiQuYing   Source File: ReSetPwdActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mPhone = getIntent().getStringExtra("phone");
}
 
Example 27
Source Project: QiQuYing   Source File: CreateUserInfoActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
}
 
Example 28
Source Project: QiQuYing   Source File: AboutActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	mAboutVersion.setText(new StringBuilder("奇趣营 V").append(ToolsUtils.getVersionName(this)));
}
 
Example 29
Source Project: QiQuYing   Source File: UserInfoActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	ViewUtils.inject(this);
	init();
}
 
Example 30
Source Project: AndJie   Source File: BaseActivity.java    License: GNU General Public License v2.0 4 votes vote down vote up
protected void beforeCreate() {
	ViewUtils.inject(this);
}