Re: [android-developers] what's wrong with this http post to server code?

2011-06-27 Thread
i found the problem by myself. It's problem of the usage of deflater,
correct solution should be:
public static byte[] deflaterCompress(String str) throws IOException
{
TOTAL_LEN = 0;
byte[] input = str.getBytes(encoding);
Deflater deflater = new Deflater();
deflater.setInput(input);
deflater.finish();
 byte[] buf = new byte[8192];
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 while (!deflater.finished()) {
 int byteCount = deflater.deflate(buf);
 TOTAL_LEN += byteCount;
 baos.write(buf, 0, byteCount);
 }
 deflater.end();

 byte[] compressedBytes = baos.toByteArray();
 return compressedBytes;
}

On Mon, Jun 27, 2011 at 1:09 PM, lily lily.wang.2...@gmail.com wrote:

 **
 Have you add the internet permission in manifest like this?
 uses-permission
 android:name=android.permission.INTERNET/uses-permission

 于 2011/6/27 11:10, 陈彧堃 写道:

 I use deflater to compress string data. It works fine on java console
 project, but while running on android enviroment, server will report buffer
 error problem and reture 500.

  SendMessage(String content, String url)
 {
  byte[] bs = deflaterCompress(content);
   URL url = new URL(urlStr);
 HttpURLConnection httpConn = (HttpURLConnection)
 url.openConnection();
 httpConn.setDoOutput(true);
 httpConn.setRequestMethod(POST);
 httpConn.setDoInput(true);

 //httpConn.setRequestProperty(Content-length,
 String.valueOf(UmengDeviceHelper.TOTAL_LEN));
 httpConn.setRequestProperty(Content-Type,
 application/octet-stream);
 httpConn.setRequestProperty(Content-Encoding, deflate);
 httpConn.connect();
  DataOutputStream outputStream = new
 DataOutputStream(httpConn.getOutputStream());
 outputStream.write(bs);
 //outputStream.write(content.getBytes(utf-8));
 outputStream.flush();
 outputStream.close();

 int responseCode = 500;
 try {
 responseCode = httpConn.getResponseCode();
 Log.i(MobclickAgent, reture code is: + responseCode);
 } catch (NumberFormatException e) {
 // ignore
  e.printStackTrace();
 }
 }

  public static byte[] deflaterCompress(String str) throws IOException
  {
  byte[] input = str.getBytes(encoding);
  byte[] output = new byte[100];
  Deflater compresser = new Deflater();
  compresser.setInput(input);
  compresser.finish();
  TOTAL_LEN = compresser.deflate(output);
   return output;
  }
  --
 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


  --
 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


-- 
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] what's wrong with this http post to server code?

2011-06-26 Thread
I use deflater to compress string data. It works fine on java console
project, but while running on android enviroment, server will report buffer
error problem and reture 500.

SendMessage(String content, String url)
{
byte[] bs = deflaterCompress(content);
 URL url = new URL(urlStr);
HttpURLConnection httpConn = (HttpURLConnection)
url.openConnection();
httpConn.setDoOutput(true);
httpConn.setRequestMethod(POST);
httpConn.setDoInput(true);

//httpConn.setRequestProperty(Content-length,
String.valueOf(UmengDeviceHelper.TOTAL_LEN));
httpConn.setRequestProperty(Content-Type,
application/octet-stream);
httpConn.setRequestProperty(Content-Encoding, deflate);
httpConn.connect();
DataOutputStream outputStream = new
DataOutputStream(httpConn.getOutputStream());
outputStream.write(bs);
//outputStream.write(content.getBytes(utf-8));
outputStream.flush();
outputStream.close();

int responseCode = 500;
try {
responseCode = httpConn.getResponseCode();
Log.i(MobclickAgent, reture code is: + responseCode);
} catch (NumberFormatException e) {
// ignore
 e.printStackTrace();
}
}

public static byte[] deflaterCompress(String str) throws IOException
{
byte[] input = str.getBytes(encoding);
byte[] output = new byte[100];
Deflater compresser = new Deflater();
compresser.setInput(input);
compresser.finish();
TOTAL_LEN = compresser.deflate(output);
 return output;
}

-- 
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

Re: [android-developers] what's wrong with this http post to server code?

2011-06-26 Thread
i tried that, result has no difference

2011/6/27 Дениска, Рынский (из за Угла) denis.ryn...@gmail.com

 You do not set content length. It supposes to be chunked, but it's worth to
 set some http watcher and see what actually you transfer.

 --
 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

-- 
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

Re: [android-developers] Απ: google-api-client + Buzz + OAuth2 + auth token

2011-05-18 Thread
加
在 2011-5-18 下午3:26,George Moschovitis george.moschovi...@gmail.com写道:

-- 
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

Re: [android-developers] Enabling ProGuard in Eclipse

2011-04-04 Thread
it‘s ok to append to the end, I tried.

On Wed, Jan 19, 2011 at 3:02 PM, Ted Hopp ted.h...@gmail.com wrote:

 The new documentation on ProGuard (http://developer.android.com/guide/
 developing/tools/proguard.html) says to add a line to the
 default.properties file in the project home directory. However, on
 opening this file, I read at the top:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!

 Am I missing something?

 It would be nice if there was a way to enable ProGuard only for a
 production build from Eclipse (i.e., when exporting the finished
 product).

 --
 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

-- 
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] slidingdrawer problem

2011-02-05 Thread
I have a button on handle, but its registered event can not response because
of the slidingDrawer handler's event handling, how can I add enable a
button's response event on slidingdrawer's handler?
Thanks very much.

-- 
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

Re: [android-developers] Re: How to fetch own mobile number in android

2011-02-04 Thread
That's almost impossible. Use short message to do it.

-- 
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] how to block the system notification of a message after broadcast has received it?

2011-01-20 Thread


-- 
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

Re: [android-developers] Is it possible to monitor the web traffic of each application?

2011-01-18 Thread
How does this app comes out?
http://androidforums.com/android-applications/86525-network-monitoring-per-application.html

On Thu, Dec 30, 2010 at 4:47 PM, Dianne Hackborn hack...@android.comwrote:

 Sorry, no it is not.

 On Thu, Dec 30, 2010 at 12:25 AM, 陈彧堃 chenyuku...@gmail.com wrote:


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] ant build error while importing third-party library

2011-01-17 Thread
When I put a third-party jar into /lib folder, then build it with ant, the
error shows. Also the error goes off if the library is removed.

 [echo] Converting compiled files and external libraries into
bin/classes.dex...
[apply]
[apply] UNEXPECTED TOP-LEVEL ERROR:
[apply] java.lang.OutOfMemoryError: Java heap space
[apply] at java.util.ArrayList.init(Unknown Source)
[apply] at java.util.ArrayList.init(Unknown Source)
[apply] at
com.android.dx.ssa.back.FirstFitLocalCombiningAllocator$1.proc

-- 
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] can not find draw9patch.jar after updating to 2.3

2011-01-03 Thread
Exception in thread AWT-EventQueue-0 java.lang.NoClassDefFoundError:
org/jdesktop/swingworker/SwingWorker
at com.android.draw9patch.Application$1.run(Application.java:48)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.ClassNotFoundException:
org.jdesktop.swingworker.SwingWorker
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 9 more

-- 
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] Is it possible to monitor the web traffic of each application?

2010-12-30 Thread


-- 
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

Re: [android-developers] Re: how to get the GPU information of android device?

2010-12-28 Thread
thanks, but it can only display CPU information.

On Tue, Dec 28, 2010 at 2:31 PM, patrick patrick.boul...@gmail.com wrote:

 You can use the application android system info in the android
 market

 On 28 déc, 00:24, 陈彧堃 chenyuku...@gmail.com wrote:
  rt, thanks.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Re: how to get the GPU information of android device?

2010-12-28 Thread
I found GPU information is under OpenGL information.

Log.d(GL, GL_RENDERER =  + gl.glGetString(GL10.GL_RENDERER));
Log.d(GL, GL_VENDOR =  + gl.glGetString(GL10.GL_VENDOR));
Log.d(GL, GL_VERSION =  + gl.glGetString(GL10.GL_VERSION));
Log.i(GL, GL_EXTENSIONS =  + gl.glGetString(GL10.GL_EXTENSIONS));

My question is, how to use 'gl'?

On Tue, Dec 28, 2010 at 6:01 PM, Nightwolf mikh...@gmail.com wrote:

 Quadrant benchmark displays GPU info.

 On 28 дек, 12:21, 陈彧堃 chenyuku...@gmail.com wrote:
  thanks, but it can only display CPU information.
 
 
 
  On Tue, Dec 28, 2010 at 2:31 PM, patrick patrick.boul...@gmail.com
 wrote:
   You can use the application android system info in the android
   market
 
   On 28 déc, 00:24, 陈彧堃 chenyuku...@gmail.com wrote:
rt, thanks.
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubs­cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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] how to get the GPU information of android device?

2010-12-27 Thread
rt, thanks.

-- 
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

Re: [android-developers] ImageView Problem

2010-12-26 Thread
Did you forget to set the src of the imageview?

On Sat, Dec 25, 2010 at 9:23 PM, ricardocunha ricardocu...@gmail.comwrote:

 Hi Everybody,

 I have a simple doubt but, I don´t understand what is happening.

 I have a simple ImageView over a Linear Layout:
 ImageView android:layout_height=wrap_content android:id=@+id/
 LogImgTela android:layout_width=wrap_content/ImageView

 When I running this layout on a Activity the Emulator shows on the
 screen EditText Buttons and TextViews.

 But when I put an imagem on the src property of ImageView the emulator
 shows an Exception when executing the method:
 setContentView(R.layout.login);

 login.xml is my layout, and I set the src property using the Visual
 mode of eclipse ADT plugin, and the plugin shows the image, but when I
 running shows the exception:

 Binary XML file line #8: Error inflating class
 android.widget.ImageView

 Note: When I was using a Project with Android 1.6 sdk Level 4 works
 perfectly, but I need to change to 2.0 Version because bluetooth, and
 all the images on the project show the same exception.


 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] TranslateAnimation problem

2010-12-13 Thread
It's fine, but still will be something not comfortable. For example I set
some sub-view to be invisible, there will be flicker. How do you solve it?
By the way, have you tried setFillAfter?

On Mon, Dec 13, 2010 at 8:50 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Mon, Dec 13, 2010 at 7:30 AM, Yukun Chen chenyuku...@gmail.com wrote:
  Hi all, I use TranslateAnimation to move a view from position A to
  position B, and I want the view to stay at B after animation. I use
  setFillAfter according to its usage. It does stay at B, but the view's
  focus still stays at A. Does anybody meet the same problem?

 If you want an animation to have a permanent effect, you use the
 animation listener to modify the layout to have the permanent effect.
 Animations do not change layout rules -- you change layout rules, by
 modifying the appropriate LayoutParams objects and the like.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] admob ads in android app not showing all the time

2010-12-13 Thread
Each mobile ad-network has different fill rate, admob's fill rate is very
low outside America. You can try some ad aggregator like adwhirl or mobclix

On Mon, Dec 13, 2010 at 7:19 PM, Etienne lawloretie...@gmail.com wrote:

 Hello, so i am creating an android app.  I have followed the tutorial and
 example on the admob website.  I requestFreshAd() in test mode and then
 setTestDevices().  This works most of the time but not all the time.  I
 understand that requestFreshAd() is making a request for an ad and needs
 internet connectivity.  I am testing this on the android emulator.  I
 thought that in test mode an ad is always returned.  How do i deal with the
 situation when an ad is not displayed?  Any help would be greatly
 appreciated.  Thank you.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] TranslateAnimation problem

2010-12-13 Thread
Hey man, I tried your SlidingPanel demo, you use fading out animation.
However, if the panel's alpha value is not set from 1.0 to 0.0(for example,
alway 1.0), there will be flicker at the end of animation.

On Mon, Dec 13, 2010 at 9:08 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Mon, Dec 13, 2010 at 8:03 AM, 陈彧堃 chenyuku...@gmail.com wrote:
  It's fine, but still will be something not comfortable. For example I set
  some sub-view to be invisible, there will be flicker. How do you solve
 it?

 Set the sub-view to be invisible after it has animated off-screen via
 your TranslateAnimation. See:


 https://github.com/commonsguy/cw-advandroid/tree/master/Animation/SlidingPanel

  By the way, have you tried setFillAfter?

 IMHO, setFillAfter() is fairly useless, since it only affects pixels,
 not the actual widget position.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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] Can not find target after updating android 2.3 sdk

2010-12-10 Thread
Under ubuntu 10.04  Eclipse, after updating to 2.3 sdk using Android SDK
and AVD Manager, target can not display when setting sdk location, does
anybody meet the same problem?

-- 
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

Re: [android-developers] Combining an image

2010-12-09 Thread
Does your project base on android 1.5? I found the same problem on 1.5 sdk.

-- 
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

Re: [android-developers] Re: ninePatch bug?

2010-12-08 Thread
Yes, I read the api guideline carefully.

On Wed, Dec 8, 2010 at 5:26 PM, Sarwar Erfan erfanonl...@gmail.com wrote:

 Did you set the stretch and content areas correctly in the 9 patch? And are
 you using correct filename format (file.9.png)?

 Regards
 Sarwar Erfan

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Re: ninePatch bug?

2010-12-08 Thread
I meet the first two.
You can see the image here:
http://cid-a4a2149221009904.office.live.com/self.aspx/.Public/ban.9.png
On Wed, Dec 8, 2010 at 5:43 PM, Daniel Drozdzewski 
daniel.drozdzew...@gmail.com wrote:

 On Wed, Dec 8, 2010 at 9:37 AM, 陈彧堃 chenyuku...@gmail.com wrote:
  Yes, I read the api guideline carefully.
 


 Did you mark the stretchable regions correctly?
 Did you see in the tool itself your PNG correctly stretched?
 Any chance of you pasting that image somewhere for people to look at?

 Daniel

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: ninePatch bug?

2010-12-08 Thread
my phone is milestone with resolution 854×480, did you notice there is
sawtooth at the blue arrow on the right-bottom corner when you load in
ninepatch?


On Wed, Dec 8, 2010 at 7:32 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  I just downloaded the file and loaded it into DrawNinePatch. It looked
 fine in the preview, when stretched either vertically or horizontally.

 Are you putting the file into the right alternate resource folder? I.e.
 drawable-hdpi, etc.? What is your device's resolution?

 -- Kostya

 08.12.2010 13:05, 陈彧堃 пишет:

 I meet the first two.
 You can see the image here:
 http://cid-a4a2149221009904.office.live.com/self.aspx/.Public/ban.9.png
 On Wed, Dec 8, 2010 at 5:43 PM, Daniel Drozdzewski 
 daniel.drozdzew...@gmail.com wrote:

 On Wed, Dec 8, 2010 at 9:37 AM, 陈彧堃 chenyuku...@gmail.com wrote:
  Yes, I read the api guideline carefully.
 


  Did you mark the stretchable regions correctly?
 Did you see in the tool itself your PNG correctly stretched?
 Any chance of you pasting that image somewhere for people to look at?

 Daniel

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


 --
 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



 --
 Kostya Vasilyev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.com

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: ninePatch bug?

2010-12-08 Thread
Thanks, but I don't think so.
Actually I made two imageview, one is the source and the other is the
destination, and align them together with the same size. They looks quite
different.

On Wed, Dec 8, 2010 at 8:29 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 08.12.2010 14:54, Daniel Drozdzewski пишет:

  On Wed, Dec 8, 2010 at 11:47 AM, 陈彧堃chenyuku...@gmail.com  wrote:

 my phone is milestone with resolution 854×480, did you notice there is
 sawtooth at the blue arrow on the right-bottom corner when you load in
 ninepatch?

 I didn't ...
 Looks just fine to me.

  It's there alright. You've just got to zoom in to notice.


 --
 Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.com

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: ninePatch bug?

2010-12-08 Thread
I use android 1.5, so there's no drawable-hdpi folder.
Actually I made two imageview, one is the source and the other is the
destination, and align them together with the same size. They looks quite
different.

On Wed, Dec 8, 2010 at 7:59 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  08.12.2010 14:47, 陈彧堃 пишет:

 my phone is milestone with resolution 854×480, did you notice there is 
 sawtooth at the blue arrow on the right-bottom corner when you load in 
 ninepatch?

  Are you putting the nine-patch into drawable-hdpi ?

 The sawtooth is in your source image. It shows in Photoshop or Windows
 Image Viewer, if you zoom in.

 Fix your source to get rid of sawtooth - Android isn't going to
 automatically make your images prettier :)


 --
 Kostya Vasilyev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.com

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: ninePatch bug?

2010-12-08 Thread
It really works, thanks very much.

On Wed, Dec 8, 2010 at 9:04 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 08.12.2010 15:47, 陈彧堃 пишет:

  I use android 1.5, so there's no drawable-hdpi folder.


 There you go. The image is scaled at runtime - there is no native support
 for high-res screens in 1.5.

 Switch your project to build with Android 1.6, move the nine patch into
 drawable-hdpi (you can create the lower-res versions later).

 Also either add minSdk=4, or supports-screens to the manifest.


 --
 Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.com


 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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