我在android中的水平视图中有图像列表.如果我单击特定图像的图像视图必须以编程方式突出显示边框颜色.如何为图像视图的突出显示边框执行此操作.提前致谢.
当用户单击ImageView的单个图像时,我想显示像ImageView的这个边框.
码
horizontalimage=(LinearLayout)findViewById(R.id.linearimage);
// final RelativeLayout r1=(RelativeLayout)findViewById(R.id.relative_border);
// frame=(FrameLayout)findViewById(R.id.framelayout
if(multipleimage.length()>0) {
for (int j = 0;j<multipleimage.length();j++)
{
pimages=multipleimage.getJSONObject(j);
JSONObject oneimage=multipleimage.getJSONObject(0);
ii= new ImageView(singleshooppingcart.this);
multipleimages=(ImageView)findViewById(R.id.singleimage);
ii.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
LinearLayout.LayoutParams image = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
image.width=100;
image.height=1
image.setMargins(5,0,0,0);
final String multimgs=pimages.getString("original_res");
String oneimg=oneimage.getString("original_res");
String[] img2 = multimgs.split("\\.");
String imagone=productpath + alertObj.getString("seller_id")+ '/' + img2[0] + '(' + '1' + '0' + '0' + ')' + '.' + img2[1];
String singleiamges=productpath + alertObj.getString("seller_id")+ '/' + oneimg;
// displayimages=productpath + alertObj.getString("seller_id")+ '/' + multimgs[];
YelloPage.imageLoader.displayImage(imagone, …Run Code Online (Sandbox Code Playgroud) android android-layout android-imageview android-fragments android-studio