项目:YalpStore
文件:FullscreenImageActivity.java
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (null == DetailsActivity.app) {
Log.w(getClass().getSimpleName(),"No app stored");
finish();
return;
}
gallery gallery = ((gallery) findViewById(R.id.gallery));
gallery.setAdapter(new FullscreenImageAdapter(
this,DetailsActivity.app.getScreenshotUrls(),getwindowManager().getDefaultdisplay().getWidth(),getwindowManager().getDefaultdisplay().getHeight()
));
gallery.setSelection(intent.getIntExtra(INTENT_SCREENSHOT_NUMBER,0));
}
项目:YalpStore
文件:ImageAdapter.java
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
int w = screenWidth;
int h = screenWidth;
if (null != bitmap) {
w = Math.min(w,bitmap.getWidth());
h = Math.min(h,bitmap.getHeight());
}
imageView.setLayoutParams(new gallery.LayoutParams(w,h));
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
if (imageView.getParent() instanceof gallery) {
gallery gallery = (gallery) imageView.getParent();
gallery.setMinimumHeight(Math.max(gallery.getMeasuredHeight(),h));
}
}
项目:Grandroid2
文件:StateKeeper.java
/**
* 儲存view的值,需設定過tag
*
* @param obj view物件
*/
protected void save(View obj) {
Editor editor = settings.edit();
if (obj instanceof TextView) {
editor.putString(obj.getTag().toString(),((TextView) obj).getText().toString());
} else if (obj instanceof EditText) {
editor.putString(obj.getTag().toString(),((EditText) obj).getText().toString()).commit();
} else if (obj instanceof ListView) {
editor.putInt(obj.getTag().toString(),((ListView) obj).getFirstVisiblePosition()).commit();
} else if (obj instanceof gallery) {
editor.putInt(obj.getTag().toString(),((gallery) obj).getFirstVisiblePosition()).commit();
} else if (obj instanceof GridView) {
editor.putInt(obj.getTag().toString(),((GridView) obj).getFirstVisiblePosition()).commit();
}
editor.commit();
}
项目:Grandroid2
文件:StateKeeper.java
/**
* 載入該view前次的值,需設定過tag
*
* @param obj view物件
* @return 回傳該載入的值,若沒有資料則為空字串(不是null)
*/
protected void load(View obj) {
String tag = obj.getTag().toString();
if (settings.contains(tag)) {
if (obj instanceof TextView) {
((TextView) obj).setText(settings.getString(tag,""));
} else if (obj instanceof EditText) {
((EditText) obj).setText(settings.getString(tag,""));
} else if (obj instanceof ListView) {
((ListView) obj).setSelectionFromTop(settings.getInt(tag,0),0);
} else if (obj instanceof gallery) {
((gallery) obj).setSelection(settings.getInt(tag,0));
} else if (obj instanceof GridView) {
((GridView) obj).setSelection(settings.getInt(tag,0));
}
}
}
项目:camera
文件:PictrueView.java
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
gallery = (gallery) findViewById(R.id.gallery);
bitmap = SDUtil.getimagePathFromSD();
imageAdapter = new ImageAdapter(this,bitmap.size());
gallery.setAdapter(imageAdapter);
gallery.setonItemSelectedListener(this);
gallery.setSelection(1);// 璁剧疆涓�鍔犺浇Activity灏辨樉绀虹殑鍥剧墖涓虹浜屽紶
gallery.setonItemClickListener(this);
iv = (ImageView) findViewById(R.id.iv);
//imageSwitcher.setFactory(this);
// 璁剧疆鍔ㄧ敾鏁堟灉 娣″叆娣″嚭
//imageSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_in));
//imageSwitcher.setoutAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));
}
@Override
public View getView(int position,View convertView,ViewGroup parent) {
/*产生ImageView对象*/
ImageView view = new ImageView(context);
/*设定图片给imageView对象*/
Bitmap bm = BitmapFactory.decodeFile(images.get(position));
view.setimageBitmap(bm);
/*重新设定图片的宽高*/
//view.setScaleType(ImageView.ScaleType.FIT_XY);
/*重新设定Layout的宽高*/
view.setLayoutParams(new gallery.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
return view;
}
/**
*
* Sets an image to the background of the image gallery
*
* @param image The name of the image
*/
public void BackgroundImage(String image) {
String file;
if (image.contains(".")) {
file = image.split("\\.")[0];
} else {
file = image;
}
int img = container.$context().getResources().getIdentifier(file,"drawable",container.$form().getPackageName());
if (resourceId!=-1) {
((gallery) container.$form().findViewById(resourceId)).setBackgroundDrawable(container.$context().getResources().getDrawable(img));
} else {
view.setBackgroundDrawable(container.$context().getResources().getDrawable(img));
view.requestLayout();
}
}
public CSgalleryAdapter(Context context) {
mContext = context;
mDimension = false;
mViewList = new ArrayList<View>();
mOrgViewSizeList = new HashMap<Integer,Size>();
//预设控件自适应所使用的显示参数
initdisplay();
//初始化一个默认元素
TextView nonItem = new TextView(mContext);
nonItem.setText("还没有添加元素...");
nonItem.setTextSize(22);
nonItem.setGravity(Gravity.CENTER);
nonItem.setTextColor(Color.parseColor("#ff0000"));
nonItem.setBackgroundResource(android.R.drawable.toast_frame);
nonItem.setLayoutParams(new gallery.LayoutParams(200,200));
mNonItem = nonItem;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final gallery gallery = (gallery) findViewById(R.id.gallery);
mCache = ImageCache.getInstance(this);
mCache.setCacheMaxSize(1 * 1024 /* mega */* 1024 /* kilo */);
initData();
setlistadapter(TestData.generateAdapter(this,mTestData,R.layout.thumbnail_item,mCache,320,200));
gallery.setAdapter(TestData.generateAdapter(this,R.layout.small_thumbnail_item,160,100));
}
项目:FacialExpressionRecognizer
文件:Recognizer.java
public Recognizer(final Activity parent,org.altervista.scarrozzo.facialexpressionrecognizer.util.FaceAdapter imgAdapt,gallery facegallery,ImageView faceView,String filePath,String[] progStr,Uri mCapturedImageURI) {
this.parent = parent;
this.imgAdapt = imgAdapt;
this.facegallery = facegallery;
this.faceView = faceView;
this.filePath = filePath;
this.progStr = progStr;
this.ioError = null;
this.mCapturedImageURI = mCapturedImageURI;
this.expressions = new String[]{ parent.getResources().getString(R.string.exp_neutral),parent.getResources().getString(R.string.exp_happy),parent.getResources().getString(R.string.exp_surprise),parent.getResources().getString(R.string.exp_anger),parent.getResources().getString(R.string.exp_fear),parent.getResources().getString(R.string.exp_sad),parent.getResources().getString(R.string.exp_disgust)
};
this.deleteFlag = false;
}
public View getView(int position,ViewGroup parent) {
ImageView imageView;
if (convertView == null) {
convertView = new ImageView(mContext);
imageView = (ImageView) convertView;
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setLayoutParams(new gallery.LayoutParams(
(int) (ITEM_WIDTH * mDensity + 0.5f),(int) (ITEM_HEIGHT * mDensity + 0.5f)));
// The preferred gallery item background
imageView.setBackgroundResource(mgalleryItemBackground);
} else {
imageView = (ImageView) convertView;
}
imageView.setimageResource(mImageIds[position]);
return imageView;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gallery_2);
// Get a cursor with all people
Cursor c = getContentResolver().query(Contacts.CONTENT_URI,CONTACT_PROJECTION,null,null);
startManagingCursor(c);
SpinnerAdapter adapter = new SimpleCursorAdapter(this,// Use a template that displays a text view
android.R.layout.simple_gallery_item,// Give the cursor to the list adatper
c,// Map the NAME column in the people database to...
new String[] {Contacts.disPLAY_NAME},// The "text1" view defined in the XML template
new int[] { android.R.id.text1 });
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(adapter);
}
项目:ApiDemos
文件:ImageSwitcher1.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestwindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.image_switcher_1);
mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
mSwitcher.setFactory(this);
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_in));
mSwitcher.setoutAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));
g.setonItemSelectedListener(this);
}
项目:4pdaClient-plus
文件:BbCodesBasePanel.java
public View getView(int position,ViewGroup parent) {
if (convertView == null) {
// Get a View to display image data
convertView = new ImageView(this.myContext);
((ImageView) convertView).setScaleType(ImageView.ScaleType.FIT_END);
// Set the Width & Height of the individual images
convertView.setLayoutParams(new gallery.LayoutParams((int) (m_Density * 30),(int) (m_Density * 30)));
}
try {
((ImageView) convertView).setimageBitmap(m_GetBitmapFunc.getBitmap(mContext,m_Images[position].FilePath));
convertView.setTag(m_Images[position]);
} catch (IOException e) {
e.printstacktrace();
}
return convertView;
}
@Override
public View getView(int position,ViewGroup parent)
{
if (null == convertView)
{
convertView = new MyImageView(galleryFlowActivity.this);
int width = (int) (80* getResources().getdisplayMetrics().density);
int height = (int) (120* getResources().getdisplayMetrics().density);
convertView.setLayoutParams(new gallery.LayoutParams(width,height));
}
ImageView imageView = (ImageView) convertView;
imageView.setimageDrawable(mBitmaps.get(position%mBitmaps.size()));
imageView.setScaleType(ScaleType.FIT_XY);
return imageView;
}
项目:itmarry
文件:ImageAdapter.java
@Override
public View getView(int arg0,View arg1,ViewGroup arg2) {
// Todo Auto-generated method stub
ImageView img = (ImageView)arg1;
if(img == null) {
img = new ImageView(mContext);
}
if( pic_string_id != null )
{
img.setimageDrawable(LoadImageMgr.getInstance().loadDrawble(pic_string_id.get(arg0),img,LoadImageMgr.getInstance().imageCallBack));
}else
{
img.setimageDrawable(pic_array_id.get(arg0));
}
img.setLayoutParams(new gallery.LayoutParams((int)mContext.getResources().getDimension(R.dimen.galley_high),(int)mContext.getResources().getDimension(R.dimen.galley_high)));
return img;
}
项目:ChangYou
文件:NewsActivity.java
@Override
public View getView(int arg0,ViewGroup arg2)
{
/*
* 动态生成每个下拉项对应的View,每个下拉项View由LinearLayout
*中包含一个ImageView及一个TextView构成
*/
//初始化LinearLayout
ll=new LinearLayout(context_Activity);
ll.setorientation(LinearLayout.HORIZONTAL); //设置朝向
//初始化ImageView
i_love=new ImageView(context_Activity);
i_love.setimageDrawable(context_Activity.getResources().getDrawable(msgids.get(arg0)));//设置图片
i_love.setScaleType(ImageView.ScaleType.FIT_XY);
i_love.setLayoutParams(new gallery.LayoutParams(dm.widthPixels,dm.widthPixels*80/320));
ll.addView(i_love);//添加到LinearLayout中
return ll;
}
项目:EmopAndroid
文件:HotActivity.java
@Override
public View getView(int index,View oldView,ViewGroup arg2) {
// Todo Auto-generated method stub
LinearLayout liner = new LinearLayout(HotActivity.this);
liner.setBackgroundColor(getResources().getColor(R.color.color_hot_item));
liner.setLayoutParams(new gallery.LayoutParams(gallery.LayoutParams.FILL_PARENT,gallery.LayoutParams.FILL_PARENT
));
ImageView i = new ImageView (HotActivity.this);
i.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.FILL_PARENT
));
i.setScaleType(ScaleType.CENTER_CROP);
liner.addView(i);
HashMap<String,Object> item = (HashMap<String,Object>)this.getItem(index);
String url = (String)item.get("ItemImage");
client.appImgLoader.loadImage(url,i,winWidth,true);
//client.appImgLoader.loadImage(url,i);
return liner;
}
项目:mockey
文件:PickBackgroundImagesActivity.java
@Override
public View getView(int position,ViewGroup parent) {
// create the view
ImageView imageView = new ImageView(galleryContext);
// specify the bitmap at this position in the array
imageView.setimageBitmap(MyApplication.getInstance()
.getBackgroundBitmap(position));
// set layout options
imageView.setLayoutParams(new gallery.LayoutParams(300,200));
// scale type within view area
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
// set default gallery item background
imageView.setBackgroundResource(defaultItemBackground);
// return the view
return imageView;
}
项目:JDMall
文件:IndexActivity.java
@Override
protected void findViewById() {
// Todo Auto-generated method stub
mIndexHour = (TextView) findViewById(R.id.index_miaosha_hour);
mIndexMin = (TextView) findViewById(R.id.index_miaosha_min);
mIndexSeconds = (TextView) findViewById(R.id.index_miaosha_seconds);
mIndexPrice = (TextView) findViewById(R.id.index_miaosha_price);
mIndexRawPrice = (TextView) findViewById(R.id.index_miaosha_raw_price);
mMiaoShaimage = (ImageView) findViewById(R.id.index_miaosha_image);
mViewPager = (jazzyViewPager) findViewById(R.id.index_product_images_container);
mIndicator = (LinearLayout) findViewById(R.id.index_product_images_indicator);
mStormgallery = (gallery) findViewById(R.id.index_jingqiu_gallery);
mPromotiongallery = (gallery) findViewById(R.id.index_tehui_gallery);
mSearchBox = (EditText) findViewById(R.id.index_search_edit);
mSearchButton = (ImageButton) findViewById(R.id.index_search_button);
mTopLayout = (LinearLayout) findViewById(R.id.index_top_layout);
}
项目:arduino2android
文件:HelpActivity.java
@Override
public View getView(int position,ViewGroup parent) {
//create the view
ImageView imageView = new ImageView(galleryContext);
//specify the bitmap at this position in the array
imageView.setimageBitmap(imageBitmaps[position]);
//set layout options
imageView.setLayoutParams(new gallery.LayoutParams(300,200));
//scale type within view area
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
//set default gallery item background
imageView.setBackgroundResource(defaultItemBackground);
//return the view
return imageView;
}
@Override
public View getView(int position,ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
imageView = new ImageView(this.context);
imageView.setPadding(3,3,3);
convertView = imageView;
holder.imageView = imageView;
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.imageView.setimageDrawable(plotsImages.get(position));
holder.imageView.setScaleType(ScaleType.FIT_CENTER);
holder.imageView.setLayoutParams(new gallery.LayoutParams(270,450));
return imageView;
}
/**
* get view specifies layout and display options for each thumbnail in the
* gallery
*
* @param position
* the index of the selected photo in the adapter
* @param convertView
* the view that is going to be converted to user's desire
* @param parent
* a ViewGroup object
* @return the converted view for the Photo
*/
public View getView(int position,ViewGroup parent) {
/* create the view */
ImageView imageView = new ImageView(galleryContext);
/* specify the bitmap at this position in the array */
imageView.setimageBitmap(imageBitmaps[position]);
/* set layout options */
imageView.setLayoutParams(new gallery.LayoutParams(300,200));
/* scale type within view area */
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
/* set default gallery item background */
imageView.setBackgroundResource(defaultItemBackground);
/* return the view */
return imageView;
}
项目:ZalartAndroid
文件:AddReportView.java
public AddReportView(Activity activity) {
super(activity);
mBtnPicture = (Button) activity.findViewById(R.id.btnPicture);
mBtnAddCategory = (Button) activity.findViewById(R.id.add_category);
mPickDate = (Button) activity.findViewById(R.id.pick_date);
mPickTime = (Button) activity.findViewById(R.id.pick_time);
mDeleteReport = (Button) activity.findViewById(R.id.delete_report);
mLatitude = (EditText) activity.findViewById(R.id.incident_latitude);
mLongitude = (EditText) activity.findViewById(R.id.incident_longitude);
gallery = (gallery) activity.findViewById(R.id.gallery);
mIncidentTitle = (EditText) activity.findViewById(R.id.incident_title);
mIncidentLocation = (EditText) activity
.findViewById(R.id.incident_location);
mIncidentDesc = (EditText) activity.findViewById(R.id.incident_desc);
mNews = (EditText) activity.findViewById(R.id.report_news);
mSwitcher = (ImageSwitcher) activity
.findViewById(R.id.sel_image_switcher);
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(activity,android.R.anim.fade_in));
mSwitcher.setoutAnimation(AnimationUtils.loadAnimation(activity,android.R.anim.fade_out));
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gallery_2);
// Get a cursor with all people
Cursor c = getContentResolver().query(Contacts.CONTENT_URI,// The "text1" view defined in the XML template
new int[] { android.R.id.text1 });
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(adapter);
}
项目:MEng
文件:ImageSwitcher1.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestwindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.image_switcher_1);
mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
mSwitcher.setFactory(this);
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));
g.setonItemSelectedListener(this);
}
@Override
public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {
m_view = inflater.inflate(R.layout.fragment_fish_Feed,container,false);
m_defaultBackground = m_view.getBackground();
// Init gallery
gallery gallery = (gallery) m_view.findViewById(R.id.fishBoxgallery);
gallery.setAdapter(new FishFoodBoxAdapter(m_view.getContext()));
// Init Sensor
Context context = m_view.getContext();
m_sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
m_lastUpdate = System.currentTimeMillis();
return m_view;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gallery_2);
// Get a cursor with all people
Cursor c = getContentResolver().query(Contacts.CONTENT_URI,// The "text1" view defined in the XML template
new int[] { android.R.id.text1 });
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(adapter);
}
项目:codeexamples-android
文件:ImageSwitcher1.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestwindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.image_switcher_1);
mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
mSwitcher.setFactory(this);
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));
g.setonItemSelectedListener(this);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gallery_2);
// Get a cursor with all people
Cursor c = getContentResolver().query(Contacts.CONTENT_URI,// The "text1" view defined in the XML template
new int[] { android.R.id.text1 });
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(adapter);
}
项目:deview-2013-samples
文件:ImageSwitcher1.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestwindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.image_switcher_1);
mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
mSwitcher.setFactory(this);
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));
gallery g = (gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));
g.setonItemSelectedListener(this);
}
项目:gundog-engine
文件:UpgradeRightLayout.java
public void reset() {
upgradeLayout = new LinearLayout(activity);
upgradeLayout.setorientation(LinearLayout.VERTICAL);
ADS.placeObtrusiveADMobAD(upgradeLayout);
selectionLayout = new LinearLayout(activity);
selectionLayout.setorientation(LinearLayout.VERTICAL);
gallery gallery = generateraceSelectionLayout();
upgradeLayout.addView(gallery);
ImageView seperator = new ImageView(activity);
seperator.setimageBitmap(BitmapCache.getBitmap(R.drawable.menu_seperator));
upgradeLayout.addView(seperator);
upgradeLayout.addView(selectionLayout);
}
public AddReportView(Activity activity) {
super(activity);
mBtnPicture = (Button) activity.findViewById(R.id.btnPicture);
mBtnAddCategory = (Button) activity.findViewById(R.id.add_category);
mPickDate = (Button) activity.findViewById(R.id.pick_date);
mPickTime = (Button) activity.findViewById(R.id.pick_time);
mDeleteReport = (Button) activity.findViewById(R.id.delete_report);
mLatitude = (EditText) activity.findViewById(R.id.incident_latitude);
mLongitude = (EditText) activity.findViewById(R.id.incident_longitude);
gallery = (gallery) activity.findViewById(R.id.gallery);
mIncidentTitle = (EditText) activity.findViewById(R.id.incident_title);
mIncidentLocation = (EditText) activity
.findViewById(R.id.incident_location);
mIncidentDesc = (EditText) activity.findViewById(R.id.incident_desc);
mNews = (EditText) activity.findViewById(R.id.report_news);
mSwitcher = (ImageSwitcher) activity
.findViewById(R.id.sel_image_switcher);
mSwitcher.setInAnimation(AnimationUtils.loadAnimation(activity,android.R.anim.fade_out));
this.mapView = (MapView) activity.findViewById(R.id.location_map);
}
项目:buildAPKsSamples
文件:Wallpaper.java
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
requestwindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.wallpaper);
mgallery = (gallery) findViewById(R.id.gallery);
mgallery.setAdapter(new ImageAdapter(this));
mgallery.setonItemSelectedListener(this);
mgallery.setonItemClickListener(this);
}
项目:buildAPKsSamples
文件:Wallpaper.java
public View getView(final int position,ViewGroup parent) {
ImageView i = new ImageView(mContext);
i.setimageResource(THUMB_IDS[position]);
i.setAdjustViewBounds(true);
i.setLayoutParams(new gallery.LayoutParams(
LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
i.setBackgroundResource(android.R.drawable.picture_frame);
return i;
}
项目:FaceAI_Android
文件:FaceActivity.java
private void initViews() {
mPhoto = (ImageView) findViewById(R.id.id_photo);
mGetimage = (ImageButton) findViewById(R.id.id_getimage);
mDetect = (TextView) findViewById(R.id.id_detect);
// mTip = (TextView) findViewById(R.id.id_tip);
mWaitting = findViewById(R.id.id_waiting);
gallery = (gallery) findViewById(R.id.id_gallery);
imageSwitcher = (ImageSwitcher) findViewById(R.id.id_imageSwitcher);
scrollView = (ScrollView) findViewById(R.id.scrollView1);
scrollView.setVerticalScrollBarEnabled(false);
}
项目:FaceAI_Android
文件:MyImageAdapter.java