Posts

Showing posts with the label imageview

ImageView don't load second image

Image
Clash Royale CLAN TAG #URR8PPP ImageView don't load second image I try to dynamically add and remove xml view. When add one view it works fine, but when add another view ImageView don't load image and button doesn't work. LinearLayout.LayoutParams vp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); vp.gravity= Gravity.CENTER; LayoutInflater ltInflater = getLayoutInflater(); View view = ltInflater.inflate(R.layout.publication_image, linearLayout, true); ImageView iv = view.findViewById(R.id.publicationImageView); ImageButton deleteButton = view.findViewById(R.id.deleteButton); deleteButton.setOnClickListener(deleteClickListener); iv.setImageURI(fileUri); listView.add(view); listDeletButton.add(deleteButton); EditText editText = new EditText(this); editText.setLayoutParams(vp); editText.setHint("Введите текст"); editText.setTextSize(15)...

ImageView in circular through xml

Image
Clash Royale CLAN TAG #URR8PPP ImageView in circular through xml I'd Like to make any image from my ImageView to be circular with a border. ImageView I searched but couldn't find any useful information (anything that I tried didn't work). How can I achieve this through xml: Create an ImageView with certain src and make it circular with a border? ImageView How to change the src of ImageView in java code? – chenzhongpu Oct 22 '14 at 14:12 Good simple solution here stackoverflow.com/a/28096369/2162226 - all in Java, so you can apply this formatting dynamically to images at runtime – gnB Dec 22 '16 at 0:40 15 Answers ...