本文整理汇总了Java中com.nostra13.universalimageloader.sample.R类的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
R类属于com.nostra13.universalimageloader.sample包,在下文中一共展示了R类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onOptionsItemSelected
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.item_pause_on_scroll:
pauseOnScroll = !pauseOnScroll;
item.setChecked(pauseOnScroll);
applyScrollListener();
return true;
case R.id.item_pause_on_fling:
pauseOnFling = !pauseOnFling;
item.setChecked(pauseOnFling);
applyScrollListener();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:AbsListViewBaseFragment.java
示例2: getView
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View view = convertView;
final ViewHolder holder;
if (convertView == null) {
view = inflater.inflate(R.layout.item_list_image, parent, false);
holder = new ViewHolder();
holder.text = (TextView) view.findViewById(R.id.text);
holder.image = (ImageView) view.findViewById(R.id.image);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
holder.text.setText("Item " + (position + 1));
ImageLoader.getInstance().displayImage(IMAGE_URLS[position], holder.image, options, animateFirstListener);
return view;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:ImageListFragment.java
示例3: getView
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View view = convertView;
final ViewHolder holder;
if (convertView == null) {
view = inflater.inflate(R.layout.item_list_image, parent, false);
holder = new ViewHolder();
holder.text = (TextView) view.findViewById(R.id.text);
holder.image = (ImageView) view.findViewById(R.id.image);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
holder.text.setText("Item " + (position + 1));
ImageLoader.getInstance().displayImage(IMAGE_URLS[position], holder.image, options, null);
return view;
}
开发者ID:siwangqishiq,项目名称:ImageLoaderSupportGif,代码行数:21,代码来源:ImageListFragment.java
示例4: getView
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View view = convertView;
final ViewHolder holder;
if (convertView == null) {
view = inflater.inflate(R.layout.item_list_image, parent, false);
holder = new ViewHolder();
holder.text = (TextView) view.findViewById(R.id.text);
holder.image = (ImageView) view.findViewById(R.id.image);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
holder.text.setText("Item " + (position + 1));
ImageLoader.getInstance().displayImage(imageUrls[position], holder.image, options, animateFirstListener);
return view;
}
开发者ID:jact-hz,项目名称:https-github.com-nostra13-Android-Universal-Image-Loader,代码行数:21,代码来源:ImageListFragment.java
示例5: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_stub)
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisk(true)
.considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565)
.build();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:ImageGridFragment.java
示例6: onCreateView
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fr_image_pager, container, false);
ViewPager pager = (ViewPager) rootView.findViewById(R.id.pager);
pager.setAdapter(new ImageAdapter(getActivity()));
pager.setCurrentItem(getArguments().getInt(Constants.Extra.IMAGE_POSITION, 0));
return rootView;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:ImagePagerFragment.java
示例7: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.resetViewBeforeLoading(true)
.cacheOnDisk(true)
.imageScaleType(ImageScaleType.EXACTLY)
.bitmapConfig(Bitmap.Config.RGB_565)
.considerExifParams(true)
.displayer(new FadeInBitmapDisplayer(300))
.build();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:ImagePagerFragment.java
示例8: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_stub)
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisk(true)
.considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565)
.displayer(new RoundedBitmapDisplayer(20))
.build();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:ImageGalleryFragment.java
示例9: onPrepareOptionsMenu
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public void onPrepareOptionsMenu(Menu menu) {
MenuItem pauseOnScrollItem = menu.findItem(R.id.item_pause_on_scroll);
pauseOnScrollItem.setVisible(true);
pauseOnScrollItem.setChecked(pauseOnScroll);
MenuItem pauseOnFlingItem = menu.findItem(R.id.item_pause_on_fling);
pauseOnFlingItem.setVisible(true);
pauseOnFlingItem.setChecked(pauseOnFling);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:AbsListViewBaseFragment.java
示例10: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_stub)
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisk(true)
.considerExifParams(true)
.displayer(new CircleBitmapDisplayer(Color.WHITE, 5))
.build();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:ImageListFragment.java
示例11: onOptionsItemSelected
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.item_clear_memory_cache:
ImageLoader.getInstance().clearMemoryCache();
return true;
case R.id.item_clear_disc_cache:
ImageLoader.getInstance().clearDiskCache();
return true;
default:
return false;
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:BaseFragment.java
示例12: onCreate
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_complex);
int pagerPosition = savedInstanceState == null ? 0 : savedInstanceState.getInt(STATE_POSITION);
pager = (ViewPager) findViewById(R.id.pager);
pager.setAdapter(new ImagePagerAdapter(getSupportFragmentManager()));
pager.setCurrentItem(pagerPosition);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:ComplexImageActivity.java
示例13: getPageTitle
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return getString(R.string.title_list);
case 1:
return getString(R.string.title_grid);
default:
return null;
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:ComplexImageActivity.java
示例14: onCreate
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_home);
File testImageOnSdCard = new File("/mnt/sdcard", TEST_FILE_NAME);
if (!testImageOnSdCard.exists()) {
copyTestImageToSdCard(testImageOnSdCard);
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:HomeActivity.java
示例15: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.resetViewBeforeLoading(true)
.cacheOnDisk(true)
.imageScaleType(ImageScaleType.EXACTLY)
.bitmapConfig(Bitmap.Config.RGB_565)
.considerExifParams(true)
// .displayer(new FadeInBitmapDisplayer(300))
.build();
}
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:15,代码来源:ImagePagerFragment.java
示例16: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_stub)
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisk(true)
.considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565)
// .displayer(new RoundedBitmapDisplayer(20))
.build();
}
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:15,代码来源:ImageGalleryFragment.java
示例17: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_stub)
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisk(true)
.considerExifParams(true)
// .displayer(new CircleBitmapDisplayer(Color.WHITE, 5))
.build();
}
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:14,代码来源:ImageListFragment.java
示例18: ImageAdapter
import com.nostra13.universalimageloader.sample.R; //导入依赖的package包/类
ImageAdapter(Context context) {
inflater = LayoutInflater.from(context);
options = new DisplayImageOptions.Builder()
.showImageForEmptyUri(R.drawable.ic_empty)
.showImageOnFail(R.drawable.ic_error)
.resetViewBeforeLoading(true)
.cacheOnDisk(true)
.imageScaleType(ImageScaleType.EXACTLY)
.bitmapConfig(Bitmap.Config.RGB_565)
.considerExifParams(true)
.build();
}
开发者ID:siwangqishiq,项目名称:ImageLoaderSupportGif,代码行数:14,代码来源:ImagePagerFragment.java
注:本文中的com.nostra13.universalimageloader.sample.R类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论