imageview

Titanium ImageView wont display images?

本秂侑毒 提交于 2019-12-20 05:38:09
问题 I created an image directory in my projects in the UI folder to place my images. So the full path is currently Resources/UI/Images. When i create an image view it wont display the images. I tried different options, even a web image but nothing works? var self = Ti.UI.createView({ backgroundColor:'white' }); var imgv = Titanium.UI.createImageView({url:"http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Volkswagen_Logo.png/600px-Volkswagen_Logo.png"}); self.add(imgv); var imgv = Titanium

Can i have 2 different views with same id in android

回眸只為那壹抹淺笑 提交于 2019-12-20 05:26:26
问题 Is it right to have same Id for a TextView and a ImageView ? Since they belong to one entity I gave both of them same Id. If yes.. then how can I find these views by id separately ? 回答1: Is it right to have same Id for a TextView and a ImageView ? Short Answer: NO Long Answer: It is not right to use same IDs because by doing it can cause runtime errors. Consider the below example layout.xml <TextView android:id="@+id/location" android:layout_width="wrap_content" android:layout_height="wrap

JavaFX - get index row and index col by OnClick on GridPane [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 05:23:09
问题 This question already has answers here : Javafx - Determine position of cursor on right click relative to gridpane (1 answer) How to get GridPane Row and Column IDs on Mouse Entered in each cell of Grid in JavaFX? (1 answer) JavaFX : How to get column and row index in gridpane? (1 answer) Closed 2 years ago . I need to get the index of my specified click over my GridPane called myGrid. If I put a piece on board from my coord like here below, it works.. for example: myGrid.add(new ImageView(

App crashing after adding a ScrollView and ImageView

前提是你 提交于 2019-12-20 04:47:42
问题 I added a scroll element to the main activity of my application along with an ImageView but when I ran the project on an emulator it crashes giving me errors stemming from the main activity.The error log is a follows: http://pastebin.com/PAYrjHCL So from going through the errors I found that it was a problem in the main activity.But I don't see where I have gone wrong as I only added these two features.Can anyone spot whats wrong in this activity thats causing it to crash? My main_activity is

android Image view out of memory error

。_饼干妹妹 提交于 2019-12-20 04:35:13
问题 In my Android project I have imageButton , and after clicking on it , it must open new Activity with imageView , and in my new Activity I must see the ImageButton's image only in large type , my image size is 17mb , and I got out of memory error. But my code works for images with little size. Can somebody help to resize image or change some bitmap options or advice other way? I'm new in android , and sorry for bad English :) Here is my new Activity's XML <?xml version="1.0" encoding="utf-8"?>

Android Activity slow on 4.3 device

旧街凉风 提交于 2019-12-20 04:34:34
问题 I developed an app that would stream videos from the web. I have an activity that lists the videos including their icons, titles and status (newly updated). For every row, there is a thumbnail for the video, the video title, and then a "fresh" icon to indicate it's a new upload. In the emulator, this works relatively fine. In a 2.3 and 4.0.3 HTC Evo devices, it works great. On an HTC One 4.3 device, this activity is really slow. Clicking an item on the list, which takes you to another

Get drawable displayed size after scaling

无人久伴 提交于 2019-12-20 04:15:30
问题 here's my problem: How can get the displayed size of the drawable inside an ImageView in pixel after scalling, assuming that the ImageView size isn't equal to the scaled drawable? A lot of methods just return the original size of the Drawable or just the size of the ImageView. Here is a picture describing what I want : http://image.noelshack.com/fichiers/2013/06/1360144144-sans-titre.png 1 --> ImageView Size 2 --> The scaled image size that I want to get in px Thank you. 回答1: From the image

How do I display a contact's photo from the contact's id?

为君一笑 提交于 2019-12-20 04:15:09
问题 This code (within my CustomAdapter class) displays only the contact id based on the who sent me text messages and puts them into an ArrayList, then displays the list. I have a ImageView called holder.photo next to each contact id. How would I go about displaying the contact's photo in the in the ImageView? String folder = "content://sms/inbox/"; Uri mSmsQueryUri = Uri.parse(folder); messages = new ArrayList<String>(); contactID = new ArrayList<String>(); SMS = new ArrayList<String>(); try { c

EditText with an helpper tooltip

被刻印的时光 ゝ 提交于 2019-12-20 03:53:26
问题 I have this app on iphone and I want to make it for android,on iphone when start edit text in a EditText a tooltip with a message is showing in the top of display,i want to make it work for android too,but i didn't find anything that help,here is a link with iphone printscreen http://www.codemyworld.com/edi/Android/IMG_0022.PNG 回答1: @Override public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { //your code here //showtooltip(); } @Override public void beforeTextChanged

BottomNavigationView cause lag with image loading

冷暖自知 提交于 2019-12-20 03:49:11
问题 0 When I'm building my app, the image loading is very laggy. It seems to happen in conjuction with adding a BottomNavigationView or Toolbar, when they are removed app runs smoothly. Setup is a MainActivity and fragments loaded into it thru bottom nav bar. public class FragmentActivity extends AppCompatActivity { BottomNavigationView navi; FragmentTransaction fragmentTransaction; public static final String TAG = FragmentActivity.class.getSimpleName(); @Override protected void onCreate(Bundle