Android :: Two Misplaced Lines In UI For Activity

Oct 4, 2010

I have a problem with designing an UI Android activity. There are two blocks of misplaced graphics on the left and right of the activity - they are two lines just bellow the titlebar with 1px height and about 5-10px width. They cause buttons to break at their left and right parts. I cannot figure out what the problem is. I am using Eclipse with Android SDK 0.9.9. The lines appear not only with the emulator but in a HTC Wildfire (Android 2.1). These lines are also visible in a newly created Android project (HelloWorld).

Link to the Broken widgets - note the button's left and right sides

XML layout:


Android :: Two misplaced lines in UI for activity

Android :: Does ShowAlert Now Take 5 Lines To Do Same?

Dec 7, 2009

The subject says it all, just curious if I've missed something or does displaying a quick warning to the user require code such as the following; Dialog msg = new AlertDialog.Builder(Login.this) .setPositiveButton("OK", null) .setMessage("Please enter both login name and password") .create();;

View 8 Replies View Related

Android :: How To Draw A Different Lines In OpenGL ES

Apr 28, 2010

How to draw different types of lines like thick line, dashed line etc using opengl android?

View 6 Replies View Related

Android :: Need To Get Two Lines In A Row List View

Oct 5, 2010

I am trying to get two lines in the same row in a list view and I looked at some things online but found it hard to apply to what I am trying to achieve. Could anyone look at my code please and suggest me how I can make it possible. Code...

View 7 Replies View Related

Android :: Error When Having Edittext Lines

Oct 29, 2010

This gives me error: EditText messageEdit = (EditText)findViewById(;

Why can I not do like this on a eittext with lines?

This is how the Edittext looks like


View 1 Replies View Related

Android :: Way To Do Linear Layout With Multiple Lines?

Jun 20, 2009

Is there a way to do a linear layout with multiple lines? I want to lay out a variable set of buttons with variable labels, so I'd like to use a layout that works as a simple horizontal LinearLayout, but with multiple lines, so the buttons spill into a second (or third) line if they don't fit on the first one.

View 3 Replies View Related

Android :: Draw Multiple Lines In Edittext?

May 7, 2010

i have a customized LinkedEditText extends from EditText, and override the onDraw method as below:...........................

View 9 Replies View Related

Android :: Split Line Of Text Into Few Lines

Jul 29, 2010

I'm wondering how can I split single line text into few lines. I need it for game. I want to make it in canvas. It will be notification popup, but sometimes text is too long (I draw text canvas.drawText()), and I need to split it and draw in few lines in rows. Anyone knows a good solution? I saw methods mPaint.measureText() or TextUtils . split () , but it isn't so good in my case. Is there other method?

View 5 Replies View Related

Android :: Drawing Lines On Top Of A Image View

Jul 13, 2010

I am trying to put a background image and draw on top of that screen. I assumed activity will have a on draw method, but it does not have. it seems i need to use surfaceview. Can I put a surfaceview on top of the image view and make it transparent ? any example/tutorial i can refer to ?

View 5 Replies View Related

Android :: Drawing Simple Lines / Run On Emulator

Sep 16, 2009

I've the following code I'm trying to run on emulator ( v 1.5 of OS), but it seems like I can't use the whole canvas! Code...

View 2 Replies View Related

Android :: Emulator Bug Drawing Lines On GLSurfaceView

Aug 14, 2010

The Emulator draws line widths VERY incorrectly in OpenGL (GLSurfaceView). See for a comparison of the lines drawn correctly (in JOGL) and incorrectly in the emulator. The code also draws correctly on a real device (G1) - looks just like the JOGL screen shot. I believe this is a bug. However, I'm not an OpenGL GURU. Hence I have posted a concise version of the code to demonstrate this problem at at and I hope I am proven wrong about a bug in the emulator, and can find a way to use the emulator for what I want to do.

View 5 Replies View Related

Android :: Center A Title In A TextView With 2 Lines?

Aug 11, 2010

I know how to center the text in the TextView and how to center the TextView inside its parent layout, but what I'm looking for is how to center a title (text centered but second line starting at the same point).

What I'm looking for is this:

| Centered |
| right! |

or this:

| Center |

Not this (text centered):

| Too |
| centered! |

or this (TextView centered):

|Centered |
|wrong! |

or this (with padding and left):

| |Also | |
| |wrong! | |

Did anyone understad this? Is it possible to do this without coding the String itself?

View 3 Replies View Related

Android :: Color The Lines Of Logcat On Linux

Jul 29, 2010

The Logcat in Eclipse has colors ofr errors, warning, debug, ...How can I do to get the same result on Linux (Ubuntu) when I run the command 'adb -e logcat' in a terminal to get it colored?

View 1 Replies View Related

Android :: Change In Way Input-lines Act When Updating To 2.2

May 25, 2010

I have a calculator type app that I've developed and it's on the Android Market. It uses two input-lines (EditText) and has always worked well until I updated my Nexus One to Android 2.2.

When I would touch the input line, the soft keypad would pop-up automatically, lift up the focused input line into view, and then I would type in my problems. But when I updated to Android 2.2, the soft keypad doesn't lift the focused input line far enough and it's only half in view. Then when I scroll down to the next input line, it doesn't lift up either and it's only about 1/4 of the way into view. Another problem is that, sometimes, when I go back and forth between the two input lines and then try to enter numbers - the numbers don't appear but they do when I scroll left. Hard to explain exactly what is happening but something strange is going on there that didn't happen under my Android 2.1 and other lower versions.

I even tried to change some input line (EditText) statements in my code and also tried to change the way the soft keypad would 'pad' the view to the top but things still didn't work after I recompiled. (android:windowSoftInputMode and android:inputType)

I also wonder if they made the soft keypad in 2.2 a little bigger in height. Does anybody out there with 2.2 mess with an app that has input lines where their softkeypad has to move the input line up into view - does it work for you?

View 4 Replies View Related

Android : Way To Expand Notification Text To Two Lines?

Sep 8, 2010

Is there any settings/flags to expand the summary text of a notification to two lines instead of 1? The text I am trying to put is too long and it goes over the visible area? Will try something like (text+"/n"+restOfText) tomorrow but I don't think it's going to work...

View 5 Replies View Related

Android :: Text Longer Than Available Space / How To Get Remaining Lines?

Sep 24, 2010

I have a long text and I want it to be displayed with a TextView. The text I have is much longer than the available space. However I don't want to use scrolling, but ViewFlipper to flip to the next page. How can I retrieve the lines from the first TextView that are not shown because the view is to short so that I can paste them into the next TextView?

I simply have to use a custom View with a StaticLayout like this:

public ReaderColumView(Context context, Typeface typeface, String cText) { super(context);
Display display = ((WindowManager)
dWidth = display.getWidth(); dHeight = display.getHeight();
contentText = cText; tp = new TextPaint();
tp.setTypeface(typeface); tp.setTextSize(25);
tp.setColor(Color.BLACK); tp.setAntiAlias(true);
StaticLayout measureLayout = new StaticLayout(contentText, tp, 440, Alignment.ALIGN_NORMAL, 1, 2, true);
Boolean reachedEndOfScreen = false;
int line = 0; while (!reachedEndOfScreen) {
if (measureLayout.getLineBottom(line) > dHeight-30) { reachedEndOfScreen = true;
fittedText = contentText.substring(0, measureLayout.getLineEnd(line-1));
} line++;
} } protected void onDraw(Canvas canvas) { super.onDraw(canvas);
StaticLayout textLayout = new StaticLayout(fittedText, tp, 440, Alignment.ALIGN_NORMAL, 1, 2, true);
canvas.translate(20,20); textLayout.draw(canvas);
Thats not optimized yet but you get the point.

View 1 Replies View Related

Android :: Checkbox With Multiple Lines With Different Font Size

Oct 8, 2010

I am trying to put CheckBox with multiple lines and all lines after fist with smaller font size same as we have under from home page Menu->Settings->Sound & Display->Silent mode. It shows text "Silent mode" on first line and then some more text (kind of help/current settings) for this option and still CheckBox itself is aligned in the center of all the lines (may be on left or right side). Is that can be done by only one control/widget or group of many controls/widgets?I can only think of by using table but it is complex.

View 3 Replies View Related

Android :: Load Specific Lines Of Code According To OS Version?

Aug 23, 2010

Is there a simple line of code that would allow only loading the code if the OS version meets the requirements? Lets say I have my target OS as 2.2 but the min sdk is 3 for android 1.5 so even if i have some code in my project that isn't compatable with 1.5 it will still compile since the target OS is 2.2. Anyway, I want to ad a feature that requires code that's not in the 1.5 SDK and will cause a crash if it's loaded on a 1.5 phone. Is there a simple thing like this that I can do? So i dont have to make the entire app not available to 1.5 users?

if (Android OS == >2.1){
//Insert code here that requires 2.1 and up}
//insert code that would appear is OS is <2.1}

View 4 Replies View Related

Android :: Camera Preview - Strange Lines On 1.5 Version Of Sdk

Jan 13, 2010

I am developing the camera module for an android application. In main application when user clicks on 'take picture' button, new view with SurfaceView control is opened and camera preview is shown. When users click on dpad center, camera takes picture and save it to the disc. Pretty simple and straightforward.

Everything works fine on my device - HTC Tattoo, minsdkversion 1.6...but when I tested application on HTC Hero minsdkversion 1.5, when camera preview is shown,some strange lines occur. altough preview is crashed, taking of pictures works fine

Here is the picture:

View 3 Replies View Related

Android :: How To Display Lines Created In Web Google Maps

Jul 5, 2010

Does anyone know how to display points, lines etc. (basically every overlay) created in android in standard google maps on website? The android db is synchronized with remote db. I'm getting the points from the database, creating kml file from them and uploading in to the map. The problem is that the areas I've created are not appearing where they should. They're somewhere on the ocean.

I thought that's because I'm running this code in android:


So basically I'm doing microdegrees here. I thought that dividing lat and long from db by 1E6 would do the trick but it didn't. Can someone please help me on that one?

View 2 Replies View Related

Android :: Google Maps Showing Greed Lines

Sep 30, 2010

I have one google maps application it does not show the maps it only shows the lines. It does not show the mapview,and i also have the internet Connection

And it also genrate the following error


This is My mainfest


And main.xml


View 2 Replies View Related

Android : Create App To Draw Simple Lines Through OnTouchEvent?

Dec 29, 2009

what is best way to create app in which I only need to draw simple lines through onTouchEvent? When i use invalidate everytime i draw any line, that erase lines i draw before. But if I use some List structure to store drawed lines it lose performance. Is there any simple way to do it?

View 6 Replies View Related

Android :: Draw Transparent Lines On Bitmap Via Touch Input

Jul 23, 2010

I am working on a paint application for Android. Now I want to implement an eraser to allow erasing parts of a loaded bitmap by using touch input and making the bitmap transparent along the finger's path.

A very good example of what I try to achieve is shown in the application Steamy Window for Android. Steamy Window simulates a fogged window, where a user can wipe parts of the fog via touch input.

UPDATE: I have posted the most important sections of my current code below. I am not really happy with it for the following reasons:

Drawing is quite sluggish. What can I improve here?
I am looking for a way to use an alpha mask in order to set the pixel transparency/alpha of the pixels as I want to simulate a paint brush. Any suggestions how this could be achieved?


View 1 Replies View Related

Android :: Simplest Way To Draw Pixels Lines / Circles On A View?

Aug 14, 2010

What is the simplest way to draw pixels, lines and circles on a View?I want to move a cross cursor around, so nothing particularly intensive.I thought I could extend SurfaceView and add it to an XML and it would just work, but it just appears black, however, when I look at the layout view of localmap.xml in eclipse, the graphics appear as expected. Any ideas? My onDraw is never called on the emulator, and even calling invalidate on the class makes no difference. I shall keep trying but can anyone see anything I've missed? or is there a better way entirely? Code...

View 1 Replies View Related

Android :: Video Camera Recorder - Source And Encoder Lines

May 26, 2009

I've been trying to develop an application for the android 1.5 sdk version that allows the user to simply recorder a video but it has been a long road. I can record audio with the simple example on the android developers website but when I put the VideoSource and the VideoEncoder lines it gives a 100 error that means that the Camera server died. Here is an example of the code.
recorder.setCamera(mCamera); recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.prepare(); recorder.start(); ...

Here is the debug error messages:
05-26 11:37:55.331: INFO/ServiceManager(30): service 'media.audio_flinger' died 05-26 11:37:55.331: INFO/ServiceManager(30): service 'media.player' died 05-26 11:37:55.331: INFO/ServiceManager(30): service '' died 05-26 11:37:55.331: WARN/MediaPlayer(690): MediaPlayer server died! 05-26 11:37:55.331: ERROR/MediaPlayer(690): error (100, 0) 05-26 11:37:55.331: WARN/Camera(1462): Camera server died! 05-26 11:37:55.331: WARN/Camera(1462): ICamera died 05-26 11:37:55.341: ERROR/MediaPlayer(690): Error (100,0) 05-26 11:37:55.341: INFO/SONGSEARCH(690): album="The Assassination of Jesse James" 05-26 11:37:55.391: INFO/DEBUG(1485): debuggerd: Apr 21 2009 13:42:23 05-26 11:37:55.401: INFO/ActivityManager(60): Displayed activity 5276 ms 05-26 11:37:55.421: ERROR/Camera(1462): Error 100 05-26 11:37:55.421: WARN/AudioSystem(60): AudioFlinger server died!

View 2 Replies View Related

Android :: SQLite - Inserting String With New Lines Into Database From Csv File

Sep 9, 2010

I am trying to inject a long text entry into a SQLite database, in a TEXT field. This text has new lines in it (i.e. it spans multiple paragraphs). I can get the new lines to show up if I do the INSERT manually:


but if I have the equivalent text in a CSV file and attempt to .import it into the table, I get an error that it's expecting more columns than exist (as soon as the new line is encountered, the program assumes it's the end of the input and thus it's missing columns). Is this possible? Or is the only way to manually do each INSERT?

View 3 Replies View Related

Android :: Adapter Filtering Via GetView Still Leaves Gray Lines

Sep 23, 2010

My application uses a list of media files on the phone, i.e. images, audio and video. It also allows the user to filter the list via some checkboxes in a menu, so the user can choose to show or hide each type of files. The way I've been doing this is by putting this in the adapter's getView():

// don't show unwanted file types if (cmo.hasType(MediaType.AUDIO_FILE)){
if(!prefs.getBoolean(PREFS_SHOWAUDIO, true)){ return new ViewStub(mContext);;
} }else if(cmo.hasType(MediaType.IMAGE_FILE)){ if(!prefs.getBoolean(PREFS_SHOWIMG, true)){
return new ViewStub(mContext);;
} }else if( cmo.hasType(MediaType.VIDEO_FILE)){ if(!prefs.getBoolean(PREFS_SHOWVIDEO, true)){ return new ViewStub(mContext);; } }

Which is quite effective in the sense that the list doesn't show those elements. However, the ListView still renders a 1px grey line between each View, even if they are ViewStubs, meaning I see a thick gray line whenever a group of consecutive items are filtered away. How can I get rid of those lines? Should I create a new data array, containing only the elements that should show a view?

View 1 Replies View Related

Android :: Canvas Drawline With Semi Transparent Lines Overlap?

Aug 26, 2010

I am drawing several lines on a canvas using drawline, the lines are semi transparent (their paint has an alpha value <255) only problem is that the point at which they cross creates a dot of less transparent color (obviously) is there a simple way to avoid this?

View 1 Replies View Related

Android :: Lines And Drawables Draw Order In Google Maps

Nov 11, 2010

I'm writing an app that shows in google maps pipes and valves(lines and points). For that i've two classes.

One extends from ItemizedOverlay, and i add to map overlay one for each category of valve, and each one can have more than one item.

The second extends from Overlay, and in the draw method y draw the line with the method drawline of the canvas.

The problem i've is that the lines are drawn over the ItemizedOverlay items, no matter the order i add them to the mapView.getOverlays().

I want the lines on the bottom of all overlays. is there a way to do that.

View 1 Replies View Related

Android :: Draw 9 Patch Tool - What Is Meaning Of Black Lines Outside Figure

Nov 20, 2010

I tried enough to find in google & android this question. Also did several trials & errors, but couldn't get this question. was learning Android's "Draw Nine Patch" images. One basic I know is that, whatever image you process must be in .png format (if it's already in .9.png then it will be ignored by tool). However, couldn't understand what it literally means by "stretchable patches" ? what exactly happens when you draw black dots outside the .png image ? (preview pane shows changes happening, but I am unclear on how it makes those)When I draw black dots in left/top sides of image it shows some changes in preview; but why isn't there any effect when you do the same on right/bottom side of the image ? why this tool is used primarily for background, when we try to process on the image itself ?i am trying to modify a simple button.png (given in android sdk). Whenever I use this tool & draw black lines, it reduces the size of the image instead of 'stretching' it! Why ?What is the significance of options given below like, "show lock", "show content", "Patch scale" and so on ?I apologize for asking so many questions, but in Android online docs they haven't explained well for novice. If someone can answer these, it will become ready reference for all the begineers who search this forum.

View 2 Replies View Related

Copyrights 2005-15, All rights reserved