[android-developers] Small png doesn't scale to specified dimensions.

2011-06-14 Thread nbadal
Hello,

My app requires a small resolution resource image (32x5 px) to be
scaled to a size drawn by the user. When I display the image though,
it is always too big or too small. To test my scaling code, I also
have my app draw a blue rectangle for the specified size; when I test
it though, the rectangle is the perfect size, while the image still
scales incorrectly.

http://i.imgur.com/ttK7a.png is my result on an emulator, and
http://i.imgur.com/EdX5x.png is the result from running it on my
actual device (Samsung Vibrant).

http://i.stack.imgur.com/ipQEh.png is the small image that I use.

I don't know what is the code-uploading norm for google groups, so
I'll leave that out unless it's needed. So if I should show my code,
let me know the best way to do so.

Thank you very much in advance!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Adding Feature to Android (that I've made)

2010-08-26 Thread nbadal
I'm almost completed with a DatePickerPreference that I've built (a
preference widget I was suprised didnt already exist), and would
really like to share this function with every developer.
I know the process for submitting patches to the android open-source
project, but I was wondering how I would go about adding a whole new
feature to android that I have made, or if they even accept them. Is
there any way to go about doing this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Inserting Data into a Cursor?

2009-06-24 Thread nbadal

Alright, Thanks for the help!

On Jun 24, 10:24 am, Mark Murphy  wrote:
> nbadal wrote:
> > Would something like this work?
>
> > @Override
> > public void bindView(View view, Context context, Cursor cursor) {
> >     TextView daysUntil = (TextView) view.findViewById(R.id.daysuntil);
>
> >     String days = /* Calculations Here */
>
> >     daysUntil.setText(days);
>
> >     super.bindView(view, context, cursor);
> > }
>
> I'd do the super.bindView() before putting in your overriding value, to
> be safe, but otherwise I suspect that will work.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inserting Data into a Cursor?

2009-06-24 Thread nbadal

Would something like this work?

@Override
public void bindView(View view, Context context, Cursor cursor) {
TextView daysUntil = (TextView) view.findViewById(R.id.daysuntil);

String days = /* Calculations Here */

daysUntil.setText(days);


super.bindView(view, context, cursor);
}

On Jun 24, 10:13 am, nbadal  wrote:
> So if I wanted to intercept the date data from the database, then do
> my calculations, then send that number back out to a textview in the
> list item, what would I need to do?
>
> On Jun 24, 10:07 am, Marco Nelissen  wrote:
>
>
>
> > You can have your own CursorAdapter, and in its bindView do whatever
> > calculations and data mapping you need.
>
> > On Tue, Jun 23, 2009 at 7:19 PM, nbadal  wrote:
>
> > > Hello, I'm looking for a way to insert data into a cursor that is
> > > separate from the SQL database it retrieves the rest of the
> > > information from.
> > > Is there any way to to this, or is there a different way to add more
> > > information to a list view item?
>
> > > What I'm trying to do is to use a date column for each entry in the
> > > list to calculate the number of days until that date (and then put
> > > that number in the list item).
> > > I know how to get the value, but I just cant find a way to put it into
> > > the list without it being in the cursor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inserting Data into a Cursor?

2009-06-24 Thread nbadal

So if I wanted to intercept the date data from the database, then do
my calculations, then send that number back out to a textview in the
list item, what would I need to do?

On Jun 24, 10:07 am, Marco Nelissen  wrote:
> You can have your own CursorAdapter, and in its bindView do whatever
> calculations and data mapping you need.
>
>
>
> On Tue, Jun 23, 2009 at 7:19 PM, nbadal  wrote:
>
> > Hello, I'm looking for a way to insert data into a cursor that is
> > separate from the SQL database it retrieves the rest of the
> > information from.
> > Is there any way to to this, or is there a different way to add more
> > information to a list view item?
>
> > What I'm trying to do is to use a date column for each entry in the
> > list to calculate the number of days until that date (and then put
> > that number in the list item).
> > I know how to get the value, but I just cant find a way to put it into
> > the list without it being in the cursor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Inserting Data into a Cursor?

2009-06-24 Thread nbadal

Hello, I'm looking for a way to insert data into a cursor that is
separate from the SQL database it retrieves the rest of the
information from.
Is there any way to to this, or is there a different way to add more
information to a list view item?

What I'm trying to do is to use a date column for each entry in the
list to calculate the number of days until that date (and then put
that number in the list item).
I know how to get the value, but I just cant find a way to put it into
the list without it being in the cursor.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---