Motorola Droid X :: App Screen Scroll Stutter?
Jul 19, 2010
Does anyone's app screen stutter slightly when scrolling? If you quick flick to the bottom it seems somewhat ok but if you slow-scroll it seems to stutter. It just isn't as smooth as my iPhone. It's not terrible but comparatively annoying.
View 9 Replies
Sep 25, 2010
I just received a new Droid X yesterday from VZW and immediately upgraded it to official 2.2. The thing seems slower and more jerky than my stock incredible which is pretty damn smooth. If I scroll through the homescreens with a static (non live) wallpaper, it's almost like the walpaper stutters and jumps forward and back a fraction of an inch as it moves across the screen. Haven't really noticed it when using a live wallpaper. Anyone else see this? Really frustrating. Dissapointingly I might have to go back to the DINC if this continues. I don't notice this at all when using Launcher Pro.
View 1 Replies
View Related
Mar 7, 2010
Ever since I bought my hero in December, I have had this problem where if I'm in a game, and it requires the screen to be touched, the game stutters. This happened when I had the stock 1.5. I needed to trade my hero for another when a lot of dust showed up under the screen, so Sprint gave me another one, only this one worked perfectly. No stuttering at all. So I decide to root it, and now it's running Aloysius, and the stuttering is back. Does anyone know what could be causing this? It happens in both the official and unofficial firmware. I can't seem to find an answer anywhere. Games it does this in includes: Nesoid and snesoid, and Raging Thunder to name a few. These games worked perfectly to my shock when I got the new phone, as I originally thought it was just a hero problem. I even emailed the developer of Nesoid but he didn't know the cause. Any suggestions?
View 2 Replies
View Related
Jan 26, 2010
you know how you can scroll sideways from screen to screen? i want one of my screens to be Handcent Sms instead of just having it as an icon....is this possible? If it is, how do I do it?
View 2 Replies
View Related
Feb 11, 2010
So everything is perfect about my Eris except that the scroll-ball doesn't scroll left anymore. This isn't the first time the problem came up. My last Eris had the same problem. It scrolls in every direction except which is kinda annoying as I use it alot more than I thought I would. Should I take it up with Verizon? It isn't a life or death situation but it makes editing sentences in texts a pain.
View 2 Replies
View Related
Aug 10, 2010
I know how to display an image that is bigger than the screen. That's fairly simple and explained in details here, however, this method makes you able to scroll as far as you want, event if you have left the image and you just have black screen. I would like to know how we can make the scrolling stop when we reach the side of the picture...
View 3 Replies
View Related
Jan 8, 2010
Just downloaded gmote and it works great. I can control the computer thats hooked up to my big screen, but i cant scroll. The instructions say to use the trackball which i assume is the d-pad for the droid, but it doesn't work. Anyone have a solution or am i doing something wrong?
View 5 Replies
View Related
Aug 25, 2010
When you are reading an email, is there a way to swype to move to the next email? Coming from a Storm, a finger swipe left or right advanced you to the adjacent email. On the X, AFAIK, you have to back out to the list of emails and highlight the next one to read.
View 2 Replies
View Related
Jan 5, 2010
I finally got fed up today with the phone being laggier than ever before. i dunno what was wrong. i wasn't using any home app. no streaming widgets on the home screen. no gps on, no wifi. no cpu intensive apps running in the background. nothing i had should really be lagging the phone in any way. but it would still get laggy for no reason sometimes. and it happens randomly. scrolling through menus. lag. swiping through screens. lag. pressing drawer tab. lag. scrolling through apps. lag. and its random. sometimes its smooth but other times its just incredibly frustrating. it gets to the point where i think the phone just crashed.
So i figured it must be these apps i installed. but they weren't even running in the background so it made no sense. but i decided to uninstall them anyway. i decided to just uninstall all the games and apps that i dont play or use. ended up uninstalling about 15 dif things. can't remember specific ones. but after i did the uninstalls, i scrolled/swiped around and it seemed to be much smoother!! checked the browser and engadget and this site seemed to scroll much smoother. so i restarted my phone to really clean it all out just in case, and it really does seem like the browser lag was gone!
I used the built in android uninstaller in the applications menu to uninstall. uninstalled a bunch of sound boards and free games. not sure what app was the culprit. but i do remember having some locale sync plugin still installed even though i didnt have locale installed anymore. also uninstalled some kinda OI plugin? a plugin for OI? i also uninstalled Hi AIM. these seemed to be the most significant ones to me and what i saw as the most likely culprits. wish i had documented all my steps now because this has definitely fixed the lag problem for me. screens swipe super smooth now, menus scroll with no hiccups. browser scrolling speed is back to the way it was before 2.0.1.
View 2 Replies
View Related
Oct 28, 2010
I am trying to pull up a page that is a search screen. My friends can pull up on iphone but I have tried multiple browsers on my Droid X and it won't let me scroll to the bottom of the page, which is where you would enter a search. the page is Browse View Frame page. I have tried the stock browser and Dolphin.
View 2 Replies
View Related
Nov 12, 2009
I assume that I am not the only Droid's owner who has this weird experience with the device: sometimes when I touch on a list (e.g., Apps listed on Market) or a web-page. The list or page will rapidly scroll all the way to the bottom of the list or page. Although I experience this at least a couple times every day, I am unable to reproduce this phenomenon at will.Does anyone know what cause this? Is it a bug?
View 15 Replies
View Related
Jul 26, 2010
Is there a touchscreen gesture or a keyboard shortcut to scroll directly to the top or bottom of a list or webpage (since we can bring up the keyboard by holding down menu)?
View 2 Replies
View Related
Nov 18, 2009
I have an app which within the main Activity a SensorListener is setup. The listener detects changes from the accelerometer and sends updates to various child views, which update the display. When the app first start up, it's great - the graphics are smooth and the sensor notifications are immediately reflected in the views. Then after a few minutes it starts to stutter, making the display very jerky - and for the purpose of this app quite unusable. I've done some logging and the sensor updates are still being passed, but they start stacking up and all get sent in batches. It's like the system has put this app down the priority list after it's been running a while. I've added some garbage collecting but it only seemed to help a little. What could be happening here? How can I try and keep this app at the top of the priority list?
View 3 Replies
View Related
Oct 30, 2012
I'm porting MIUI JB for Samsung Galaxy S III. Almost everything works smooth as it should and I'm left with only one little but verry annoying issue: when pulling down the notification status bar the animation lags, it's choppy, not Jelly Bean smooth. All other animations run smooth. This problem prevents many user's acces to a beautifuly crafted ROM in wich I invest most of my spare time and I wouldn't want to stop developing this just for an animation issue.
The MIUI I port is original miuiandroid's Galaxy Nexus version and the base I use is CM10 for SGS III of course, which has nice and fluid animation.
I also tryied other MIUI base, such as Nexus S, and also changed the CM10 build, but every combination has this issue. Related to this I read in different places words like SystemUI, surfaceflinger, motion blur, and vsync... but don't know much about them.
View 1 Replies
View Related
Jan 9, 2010
I have been experiencing some frustrating audio stuttering or skipping while using A2DP Bluetooth stereo. After a lot of web searching and experimentation, I seem to have found a solution and thought I would pass it along just in case it may be of help to others.First, the problem. I am using a Sprint Samsung Moment Android v 1.5 phone and an Altec-Lansing/Plantronics Backbeat 903 bluetooth stereo headset. This combination has generally been working great so long as I am indoors or in my car. Oddly, though, as soon as I start moving around, especially outdoors -- and especially in a downtown area -- I would begin to get persistent drop outs, stuttering, skipping, etc.Research on a number of websites suggested two potential general sources for problem:
1. A2DP uses most or all of the bluetooth bandwidth and a fair amount of processor; this can create a problem of insufficient bandwidth and/or system resources. A number of sites and posts suggest various approaches based on this notion, most of which involve turning off or shutting down as many resources as possible including wifi, gps, unnecessary applications, or even restarting the phone to clear out such processes. I already do most of this just to try to keep my battery alive through the entire day. But there was one item I had not turned off and it seems to be making a significant difference: Wifi notification. (Menu --> Settings --> Wireless controls ==> Wi-Fi Settings --> Network Notification.)I have run across several theories as to why this would work. Some suggest that when you are walking outdoors (especially in an urban area), the wifi notification function encounters (moves in and out of) a lot more wifi networks and that the stuttering occurs when it is sampling or processing each of these new networks. In any event, turning this feature off seems to have made a significant difference. This seems to make a difference even if you already keep wifi turned off.
2. The other line of potential causes could be a problem with signal strength. One post suggested that bluetooth signals are stronger (or are reflected back) indoors or in a car -- but simply dissipate when you are outdoors. The suggested fix for this (as odd as it may seem) is to simply move your phone to the other side of your body. The purpose here is to avoid the bluetooth signal having to travel through your body. It turns out that Altec-Lansing actually makes this same recommendation on their support page. To my surprise, this also seems to work. The bluetooth receiver on the Backbeat headset is apparently on the left side. Being right handed, I have always preferred to carry my phone on the right. But moving the phone to my left side helped to dramatically reduce the stutters and drop outs I was experiencing with the headset.
These two steps have really helped to solve this problem for me. Using my bluetooth stereo headphones has become a real joy instead of an ongoing source of frustration. I hope this experience can be helpful to others.
View 2 Replies
View Related
Sep 10, 2010
I listen to a lot of music and podcasts while walking and have noticed that there is a tremendous amount of stutter that happens. Does anyone else get this issue? I wonder if it is the headphone jack or the software that causes this.
View 1 Replies
View Related
May 4, 2010
My lovely Droid Incredible seems to enjoy scrolling side to side when not in use. It's becoming a bit annoying, as I do not wish to set up either my email, schedule an event or stare at just the wallpaper. I'm afraid that this is taking a toll on my battery.
View 2 Replies
View Related
Apr 19, 2010
I have text area and and down to that "ok" and "cancel" button. when i click on text area keyboard appear and focus on the text area and buttons get hide behind the keyboard.
I want when text area get focus scroll a little bit and also display the bottom buttons while text area id selected.
View 2 Replies
View Related
Jun 24, 2010
I've got this odd problem which is happening on 1.6, 2.2, and a MyTouch 3G Slide (which is API #7, and listed as "2.1-Update1" in the Android Device Chooser). If anyone can explain what I'm doing wrong & how to fix it (or possibly confirm that this is an Android bug)The basic idea for my app is to make a stopwatch-sort of thing, in that the user can tap a button to start a timer, then tap it again to stop (pause) the timer; further taps alternate between resuming the timer and pausing the timer.I've got a top-level ScrollView which contains a RelativelLayout, which contains a bunch of widgets. The first widget is a HUGE button (so that it's easy to press), which pushes all my other widgets below the bottom of the screen. This is intentional, as I want to rely on the ScrollView (and an on-screen reminder to the user) to make the rest of the input options available.I've got a simple state-machine type setup, where mState is the current mode (STATE_ TIMER_ NOT_ STARTED before the user presses any buttons, RUNNING after the first press, and then PAUSED after the second, back to RUNNING after the third, etc, etc).
All this works great EXCEPT that when the timer is running, and the user presses the start/stop/resume button again, the ScrollView will scroll down a ways. I am NOT issuing this command (I don't even have a reference to ScrollView object), and I'm not sure why it's doing this.
REPRO:Compile + run the below samples. When the app starts, press the 'Start Timing' button. Use your thumb (or the mouse) to touch-drag the screen upwards (so you can see the RatingBar), then drag it back downwards (so the button is again completely on-screen). Tap the button (which now reads 'PauseTiming') again, and it'll jump down a bit. It should NOT be jumping/scrolling down, since there's no statement (that I can see) that tells it to scroll down. As near as I can tell, it's the setText that causes the scrolling ( when I comment those lines out, no scrolling occurs).WHAT I'M ASKING FOR:if I'm doing something dumb & you could point out what it is, I'd really appreciate it! I wonder if 'touch mode' might have something to do with this, since it does NOT appear to happen (in the emulator) when I use the mouse's scroll wheel to move the panel upwards (i.e.,instead of the simulated finger-dragging). I can't find a whole lot on touch-mode, and nothing specific on focus/selection in touch mode within a ScrollView if you can confirm that this error occurs for you too, that would be ok, too (since misery loves company.AHEM I mean, since it might help confirm that it's not just me MyTestApp.java package bug.android.scrollview;
import android.app.Activity;
import android.os.Bundle;
import android.text.format.Time;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
public class MyTestApp extends Activity {
public final static int STATE_TIMER_NOT_STARTED = 1;
public final static int STATE_TIMER_RUNNING = 2;
public final static int STATE_TIMER_PAUSED = 3;
private int mState;
Time t = new Time();
private Time data = new Time();
private Button btnStartStopResume;
private TextView lblSpacer;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.new_time_entry);
btnStartStopResume = (Button) findViewById(R.id.btnStartStopResume);
// Set the button's size so that the other info will also be visible
Display display = ((WindowManager) getSystemService(WINDOW_SERVICE))
.getDefaultDisplay();
// This is such a hack, but the windowScroller doesn't appear to
// have a height at this point in the lifecycle (nor in 'onResume' :( )
btnStartStopResume.setHeight(display.getHeight() - 200);
lblSpacer = (TextView) findViewById(R.id.lblSpacer);
reset();
} public void doStartStopResume(View v) {
if (mState == MyTestApp.STATE_TIMER_NOT_STARTED) {
mState = MyTestApp.STATE_TIMER_RUNNING;
data.setToNow();
} else if (mState == MyTestApp.STATE_TIMER_RUNNING) {
mState = MyTestApp.STATE_TIMER_PAUSED;
String s = getString(R.string.add_scroll_down_to_add);
lblSpacer.setText(s);
} else if (mState == MyTestApp.STATE_TIMER_PAUSED) {
mState = MyTestApp.STATE_TIMER_RUNNING;
public void doReset(View v) {
}public void doNewRunClick(View v) {
public void doAddTiming(View v) {
public void reset() {
mState = STATE_TIMER_NOT_STARTED;
new_time_entry.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/windowScroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <RelativeLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
> <Button
android:id="@+id/btnStartStopResume"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:text="Start Timing"
android:textSize="40dp"
android:height="290dp"
android:onClick="doStartStopResume" />
<TextView
android:id="@+id/lblSpacer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/btnStartStopResume"
android:layout_centerHorizontal="true"
android:text="@string/add_scroll_down_for_more" />
<TextView
android:id="@+id/lblTimeStartLabel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lblSpacer"
android:layout_alignParentLeft="true"
android:clickable="true"
android:onClick="adjustStartTime"
android:text="Start of this run:"
android:textSize="8dp" />
<TextView
android:id="@+id/lblTimeStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lblTimeStartLabel"
android:layout_alignParentLeft="true"
android:clickable="true"
android:onClick="adjustStartTime"
android:text="--:--:-- --"
android:textColor="#FFFFFF"
android:textSize="26dp" />
<TextView
android:id="@+id/lblElapsedLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lblSpacer"
android:layout_alignRight="@id/lblSpacer"
android:layout_marginRight="5dp"
android:text="Elapsed Time:"
android:textSize="8dp" />
<TextView
android:id="@+id/lblTimeElapsed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lblElapsedLabel"
android:layout_alignRight="@id/lblSpacer"
android:layout_marginRight="5dp"
android:textColor="#99ff66"
android:text="-- m -- sec"
android:textSize="26dp"
android:layout_marginBottom="10dip"/>
<CheckBox
android:id="@+id/chkNewRun"
android:onClick="doNewRunClick"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lblTimeElapsed"
android:text="This is a new run of timings"
android:layout_marginBottom="10dip" />
<TextView
android:id="@+id/lblIntensity"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Intensity (1 = none 5 = max)"
android:layout_below="@id/chkNewRun" />
<RatingBar
android:id="@+id/rbIntensity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lblIntensity"
android:numStars="5"
android:rating="2"
android:layout_marginBottom="5dip" />
<TextView
android:id="@+id/lblNotes"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Notes:"
android:layout_below="@id/rbIntensity" />
<EditText
android:id="@+id/txtNotes"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:layout_below="@id/lblNotes"
android:layout_marginBottom="10dip" />
<Button
android:id="@+id/btnReset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/txtNotes"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:text="Reset"
android:onClick="doReset" />
<Button
android:id="@+id/btnOk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/txtNotes"
android:layout_toRightOf="@id/btnReset"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:text="Add Timing To List"
android:onClick="doAddTiming" />
</RelativeLayout>
</ScrollView>
strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Timer</string>
<string name="dlg_edit_timing_title">Edit A Timing</string>
<string name="add_scroll_down_for_more">< Scroll down for more options! ></string>
<string name="add_scroll_down_to_add">< Scroll down to save this timing! ></string>
<string name="start_timing">Start Timing
</string>
<string name="stop_timing">Pause Timing
</string>
<string name="resume_timing">Resume Timing
</string>
</resources>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="bug.android.scrollview"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MyTestApp"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="5" />
</manifest>
UPDATE 1: Adding if( btnStartStopResume.isInTouchMode() )
Toast.makeText(this, "TOUCH MODE", 2000);
elseToast.makeText(this, "NOT touch mode", 2000);
then setting breakpoints in the debugger confirms that the button is always in touch mode (regardless of whether I finger-drag the panel up/down, or mouse-wheel it up/down). So it's a combination of being in touch-mode AND finger-dragging the panel after the 2nd button-press (i.e, when the app is in 'stopped/paused timing' mode) that's causing the odd extra-timing in subsequent pauses.
UPDATE 2:
I just noticed that it's scrolling down to the EditText, and no further. It looks like when you move the panel down the EditText gets the selection, and after the click event the ScrollView scrolls back to the thing that has the selection. Seems to explain why the mouse-wheel approach doesn't have this problem (it moves the selection/focus back up to the button).
View 1 Replies
View Related
Jun 21, 2010
I want to have a dynamic table, with rows added over time as a result of user interaction, using a TableLayout inside a ScrollView. This works fine, but when I want to scroll to the end of the table using fullScroll(), it always leaves out the last line; that is, it scrolls so that the one before the last one is visible. The last line is visible when scrolling manually, and the scrollbar is correct too.I'm of course open to suggestions as to how to make a better layout out of this; but I'm specifically interested in understanding why fullScroll() behaves that way. Should I give it a different parameter, or use something else altogether? Or does it do that because the newly added line isn't yet visible somehow? (if so, how can I solve that?) Or did I miss some other obvious thing?The following code replicates the problem: TestActivity.java:
package com.example.android.tests;
import java.util.Random;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ScrollView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
public class TestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
((Button) findViewById(R.id.AddRow)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
Random rnd = new Random();
TableRow nr = new TableRow(v.getContext());
for (int c=0; c<3; c++) {
TextView nv = new TextView(v.getContext());
nv.setText(Integer.toString(rnd.nextInt(20)-10));
nr.addView(nv);
}((TableLayout) findViewById(R.id.Table)).addView(nr);
// Scrolls to line before last - why?
((ScrollView) findViewById(R.id.TableScroller)).fullScroll(View.FOCUS_DOWN);
}main.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:text="Add Row"
android:id="@+id/AddRow"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
<ScrollView
android:id="@+id/TableScroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/AddRow"
android:layout_alignParentTop="true" >
<TableLayout
android:id="@+id/Table"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0,1,2" />
</ScrollView>
</RelativeLayout>
Edit: for reference, I implemented Romain Guy's solution as follows:In TestActivity.java, replace:
// Scrolls to line before last - why?
((ScrollView) findViewById(R.id.TableScroller)).fullScroll(View.FOCUS_DOWN);
// Enqueue the scrolling to happen after the new row has been layout
((ScrollView) findViewById(R.id.TableScroller)).post(new Runnable() {
public void run() {
((ScrollView) findViewById(R.id.TableScroller)).fullScroll(View.FOCUS_DOWN);
View 1 Replies
View Related
Sep 9, 2009
I am using a table layout in a screen. i need to have both horizontal and vertical scrolls. By default i am able to get vertical scroll in the view but horizontal scroll is not working. I am using android SDK 1.5 r3
Ihv already tried android:scrollbars = "horizontal". I hv read on some forums that in cupcake update horizontal scroll is possible in andorid.
View 3 Replies
View Related
Mar 12, 2009
It looks like the standard ScrollView does not support horizontal scroll. Has anyone implement a ScrollView with horizontal scroll support? It would be appreciated if you can share it.
View 6 Replies
View Related
Oct 16, 2010
I have 2 ScrollViews in my android layout. How can I synchronise their scroll positions?
View 1 Replies
View Related
Oct 12, 2010
I have a listview that when scrolled and the items go off of the screen they are not redrawn when I scroll back to them (the text and checkbox). In fact, items that are off the bottom of the screen in the listview never get drawn when scrolling to them. This only happens in Froyo. Any other version it works just fine. I have checked and the data is there as expected in the adapter when the getItem method is called, it is just not visible. The listview item is there (it's occupying the same amount of screen space per item), I just cannot see the text or checkbox once scrolled off screen and back on again. Code...
View 1 Replies
View Related
Mar 18, 2010
I'm trying to show a ScrollView with a button anchored to bottom of screen. This is coded programmatically (without using XML layout for now). The trouble is when the ScrollView has many items (requiring scrolling), it prevents the button at the bottom from showing. The bottom button is sort of pushed off the screen. Look at the code below. I have a TODO which mentions a workaround to specify the exact pixel height of the ScrollView, but this is not a good solution. If you change the for loop to add only 2 buttons, then the bottom button will show. So how do I make the ScrollView show a scrolling list, with the bottom button in view, and without specifying an exact size of the ScrollView? I've seen some discussions here:
http://groups.google.com/group/android-developers/browse_thread/threa http: //groups. google.com /group/ android-developers/browse_thread/threa But I don't know how to apply these to my situation.package com.test.ScrollViewTest; import android.app.Activity; import android.os.Bundle; import android. view. Gravity ; import android.view. ViewGroup. MarginLayoutParams; import android.widget.Button; import android. widget.ImageView; import android .widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.ScrollView; import android.widget.TextView; public class MyScrollViewTest extends Activity @Override public void onCreate(Bundle savedInstanceState) super. onCreate (savedInstanceState); LinearLayout ll = new LinearLayout(this); // the main layout of the screen ll.setOrientation (LinearLayout.VERTICAL); TextView tv1 = new TextView(this); tv1.setText("First line of text"); TextView tv2 = new TextView(this); tv2.setText("Second line of text"); ll.addView(tv1); ll.addView(tv2); ScrollView sv = new ScrollView(this);// You can only add one child (usually a layout) to a scrollview, // otherwise you get exception: "ScrollView can host only one direct child" LinearLayout ll2 = new LinearLayout(this); ll2.setOrientation(LinearLayout.VERTICAL); * TODO: PROBLEM HERE: You cannot use WRAP_CONTENT for height, because * the layout below the scrollView will not show (it's sort of pushed * off the screen - even if a margin is specified). * An alternate value of 300 works OK (remove the bottom margin too).* But this is only suitable for screen size 320x480 in portrait mode.LinearLayout.LayoutParams params Linear = new LinearLayout.LayoutParams( LinearLayout. Layout Params.FILL_PARENT, Linear Layout.LayoutParams.WRAP_CONTENT /*300*/); Add 50 pixel margin to bottom of scrollview (this margin doesn't scroll) paramsLinear.bottomMargin = 50;sv.addView(ll2); // Add some stuff to scrollView to test its depth // (it should leave a margin at bottom of screen) for (int i = 1; i < 10; i++) { TextView textView = new TextView(this) ;textView.setText ("Text View " + i); linearLayout.LayoutParams p = new LinearLayout .LayoutParams (Linear Layout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
ll2.addView (textView, p); button buttonView = new Button(this); buttonView. setText ("Button " + i);ll2.addView(buttonView, p); ll.addView(sv, paramsLinear); RelativeLayout rl = new RelativeLayout(this); RelativeLayout.LayoutParams paramsRelative = new lative Layout. LayoutParams( RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout .Layout Params .WRAP_CONTENT); // Make the button anchored to the bottom of the screen.// But this doesn't work when the ScrollView has a scrolling list of items. Why? params Relative .addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); rl.setLayout Params (params Relative) ;
View 5 Replies
View Related
Apr 21, 2010
I have created a widget to be displayed on android emulator's home screen to display some long text. In my main.xml layout file i've already set TextView properties like singleLine="true", ellipsize="marquee", focusable="true" etc, but still when my widget is displayed on home screen text does not move/scroll.code...
View 7 Replies
View Related
Nov 20, 2009
is there no way to change the timeout to scroll in ScrollView? In the source, it's set to: static final int ANIMATED_SCROLL_GAP = 250; so any drags will be blocked for 250ms. This has the appearance of the ScrollView being stuck for a bit before it moves. This makes small scroll gestures difficult to work with. There's no way around this?
View 9 Replies
View Related
Sep 17, 2010
I have a ScrollView (and a LinearLayout within it) set as main content. When the user scrolls the view further down, and then if I replace it's child (LinearLayout) with another LinearLayout, the view remains in the scrolled positioned.How do I reset the ScrollView back to coordinate 0?
View 1 Replies
View Related
Apr 12, 2010
I was thiking of buying either a screen protector from verizon or best buy. I was wondering which is the best to buy out of the two or if there is a better protector? Also what is the best case for the motorola droid? Lastly, when I make phone calls my screen goes black so it is hard for me to end calls. How can i fix this? I don't see any settings for this on the droid.
View 11 Replies
View Related
Jan 18, 2010
I am going crazy here... I've had this thing since it launched and everything is great except I keep hitting buttons with my face during calls! I mute, sometimes end calls, start 3 way calls etc and I have no idea how to prevent it. Is there any way I can make the screen lock during phone calls or change the call screen altogether?
View 12 Replies
View Related