Search Results

Search found 3 results on 1 pages for 'computerish'.

Page 1/1 | 1 

  • Bitmap in ImageView is cropped off the screen

    - by Computerish
    I'm working on an Android application that needs to download an image and display it inside an image view. The Bitmap is passed to the main java file and added to the image view like this: comic = (ImageView) findViewById(R.id.comic); comic.setImageBitmap(c.getImageBitmap()); This works, except that the left side of the image disappears off the screen. The ImageView is in a ScrollView and the scroll view maintains the correct size. This means that there is black space to the right in the ScrollView and the image is cut off to the left. The XML for the ImageView is this: <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" Any idea why my image is being cut off? Thanks!

    Read the article

  • Are parametrized calls/sanitization/escaping characters necessary for hashed password fields in SQL queries?

    - by Computerish
    When writing a login system for a website, it is standard to use some combination of parameterized calls, sanitizing the user input, and/or escaping special characters to prevent SQL injection attacks. Any good login system, however, should also hash (and possibly salt) every password before it goes into an SQL query, so is it still necessary to worry about SQL injection attacks in passwords? Doesn't a hash completely eliminate any possibility of an SQL injection attack on its own?

    Read the article

  • When to use a service in Android

    - by Computerish
    Hi everyone, I have a class that fetches data in response to button presses in the main activity. Unfortunately, I keep running into problems because this class is not an Activity or a Service. For example, without a Context I cannot translate a resource id into a string: getString(R.string.example_string); // Doesn't work Should I make this class into a Service and have the main Activity stop the class when it is closed? Should I pass the Context from the Activity into this class like this? MyClass c = new MyClass(this); Or is there some better way to handle this problem? This issue also comes up when I try to send a Toast from this class.

    Read the article

1