w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
hiding soft input in android app causes scroll view to scroll to bottom
You should only need to call hideSoftInputFromWindow() once, and try using InputMethodManager.HIDE_NOT_ALWAYS instead of "0" for the flag. EDIT: Try adding android:windowSoftInputMode="adjustPan" to your manifest.

Categories : Android

Scroll in design view for metro style app in Visual Studio 2012
You can use DesignHeight & DesignWidth property, if you want to stretch the current page in design mode. <Page x:Class="App1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:App1" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="1768" d:DesignWidth="2366"> <!-- Other XAML Controls --> </Page>

Categories : C#

How to scroll a scrollable layout in the Android Studio?
According to this change set: https://android-review.googlesource.com/#/c/61089/ , there is a fix for this coming soon. I'd hazard a guess you'll see the fix in 0.1.7.

Categories : Android

Android list view inside a scroll view
Do NEVER put a ListView inside of a ScrollView! You can find more information about that topic on Google. In your case, use a LinearLayout instead of the ListView and add the elements programmatically.

Categories : Android

AJAX chat scroll If has more than 20-30 messages, scroll to bottom will work if user didnt scroll up
Like this: http://jsfiddle.net/eP24K/2/ (see html/css to go along with below code) function insertLine() { var scrollPosition = $("#chat").scrollTop(); var scrollHeight = $("#chat")[0].scrollHeight; //console.log(scrollPosition,scrollHeight); $("#chat").append("<div>James: Hello World!</div>"); if (scrollPosition+$("#chat").height() === scrollHeight) { $("#chat").scrollTop(scrollHeight); } setTimeout(function(){ insertLine(); }, (Math.floor(Math.random()*1000))) } insertLine(); The code is in no way optimized, it's just concept.

Categories : Javascript

Lightbox script (view.js) doesn't work with tumblr infinite scroll
OK so basically your problem is that view.js doesn't auto-update after AJAX calls, which kind of sucks. You can force the update of view.js like this: new View( $('.view') ); You can test this by pasting it into the console after you scrolled all the way down, and now the images will work fine. However, you have to find the way to run it every time the DOM updates after the infinite scroll kicks in. So let's do this in another way. Add this line of code somewhere in your theme: $(document).on('click', 'a.imageView', function(e){ e.preventDefault(); $('.viewer').remove(); //This is to remove any previous viewers var s = $(this).attr('href'); var v = new View ($('.imageView')); v.open(); v.show(s); }); What this code does is creates a listener on the whole

Categories : Javascript

Use Scroll View In Android
This is the way to add scroll view: <ScrollView android:id="@+id/SCROLLER_ID" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical" android:fillViewport="true"> <com.qualcomm.QCARSamples.VideoPlayback.JustifiedTextView android:id="@+id/text_content" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="20dp" android:layout_marginBottom="80dp" android:layout_below="@id/info_frame_text" android:textColor="#ff000000" android:layout_marginLeft="40dp" android:layout_marginRight="20dp" android:visibility="gone"/> </ScrollView>

Categories : Android

How to use Scroll View In Android
if you are display your scrollview in Horizontal Linear Layout and given a weight to scrollview then set width of Scrollview to "0dp" android:layout_width="0dp" and if it is vertical then android:layout_height="0dp" also set your main LinearLayout height to fill parent

Categories : Android

Android Phonegap Scroll not work
You have run into an android bug. Overflowing DIVs inside BODY tag wont allow you to scroll. Same bug was there in iPhone (iOS < 5), but there atleast you could use two fingers and scroll. However there are workarounds for it. You can use third party libraries such as iScroll, touchScroll ... iScroll will disable your inputs for the div which you have applied scroll to. If its a simple paragraph use iScroll. Reference

Categories : Android

Scroll layout in web view android
Add this property in your activity <activity android:name="YourActivity" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden|adjustResize" />

Categories : Android

How to navigate/view/edit android platform sources (AOSP) using Intellij IDE (Android Studio preferably)?
Well, first you have to install Android studio from here: http://developer.android.com/sdk/installing/studio.html Then, if you already have a project in Eclipse here is how you export it to Android Studio: http://developer.android.com/sdk/installing/migrate.html

Categories : Android

Why my list view doesn't scroll in android?
I know I'm posting this 2 years after the OP but it might help someone coming across the same problem. I had this problem before and I fixed it using the following in my xml: <ListView android:id="@+id/lv_LVID" android:layout_width="wrap_content" android:layout_height="0dp" android:layout:weight="1"> </ListView> If it still doesn't scroll, try removing any <ScrollView> which you might have as an outer layout.

Categories : Android

Scroll View is not working properly Android
I've had a look at the layout XML and have found your problem. In one layout you are trying to define both scrollviews and their contents. You don't want to be doing this. I would also suggest you don't want a scrollview, but a listview. Take a look at This tutorial on how to create listviews with custom contents and create an arrayadapter to populate it with data. This is an example of how your main layout could look: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/llHeader" android:orientation="vertic

Categories : Android

Disable gallery scroll view on Android
override the onTouchListner for your gallery gallery.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return true; } });

Categories : Android

How to add vertical scroll bars to view in android?
I think you must create a scrollview, then add a vertical layout in that scrollview. After that, you can add textview, button or anything you want. <ScrollView android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="wrap_content" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/act_test_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop

Categories : Android

Scroll down whole activity with one element and a list view in Android
Add the "fixed height layout" as a header to your ListView with addHeaderView: listView.addHeaderView(R.layout.fixedHeightLayout);

Categories : Java

Android List View Scroll Checkbox state
What you should do is you should track the last checked item, and in the ListView's onItemClickListener, setChecked(true); the current item and setChecked(false); the last one; something like this: ListView myListView = (ListView)findViewById(/* id of listView */); CheckBox lastChecked = null; myListView.setOnItemClickListener(new onItemClickListener( @Override onItemClick(AdapterView arg0, View childView, int pos) { if(lastChecked != null) { lastCheckedBox.setChecked(false); } lastChecked = (CheckBox)((ViewGroup)childView).findViewById(/* id of checkBox */); lastChecked.setChecked(true); } ));

Categories : Android

how to add multiple child in horizontal scroll view in android
You have to put one layout as a scrollviews child, then put every other views in that child and it should work fine. Like this way: <HorizontalScrollView android:layout_width="wrap_content" android:layout_height="fill_parent" android:id="@+id/horizontalScrollView"> <LinearLayout ... > ... insert your views in here </LinearLayout> </HorizontalScrollView>

Categories : Java

How to show scroll pull in list view in android?
It is sectioned index for the listview. See this Sample and refer this SO Answer

Categories : Android

Don't work git in Android Studio
you need to install git on your computer first. in my case on Ubuntu I installed it with: sudo apt-get install git-core in terminal and followed by : git config --global user.name "NewUser" git config --global user.email newuser@example.com for configurations. That's it and now it works perfectly.

Categories : GIT

Can't scroll a ScrollView when a View inside it triggers an event in Android
The way I solved this problem was like this: On the touchmove event I simply changed the value of the scrollview's scrollingEnabled property to false, so while I'm dragging one of the elements inside of it, the scrolling will be disabled. On the touchend event I enabled once again the scrolling. I passed a reference of the scrollview's setScrollingEnabled function. foregroundWorkspaceDraggable.addEventListener('touchmove', function(e) { setScrollingEnabled(false); //Added this var currentOpacity = currentPositionX / limitToTheRight; if(currentOpacity < 0) currentOpacity = 0; else if(currentOpacity > 1) currentOpacity = 1; checkEvaluation.setOpacity(currentOpacity); var currentOpacityNotYet = currentPositionX / limitToTheLeft; if(curren

Categories : Android

Where is the warnings view in Android Studio?
Even i searched all the settings in Android Studio, but couldn't find a separate window for it. The warnings are actually visible to the right end of a particular line as a small yellow marker and clicking on that show the warnings in the status bar below. The colors of them can be editted in the inspection options. Hope this helps you.

Categories : Android

How to use ADB in Android Studio to view an SQLite DB
What it mentions as you type adb? step1. >adb shell step2. >cd data/data step3. >ls -l|grep "your app package here" step4. >cd "your app package here" step5. >sqlite3 xx.db

Categories : Android

Android ListView scroll smoothly while drawing bitmap in each item view
The list view scrolling is not smooth because you are doing operations on the UI thread. In order to avoid this you should use the Scroll listener .Perform the operations only when the scrolling stops and only for the visible items. Check List13.java in API demos sample.

Categories : Android

how to integrate a horizontal scroll view in master detail template in android
Answering my own question : On the fragment and on the OnCreateView method we add this code : mViewPager = (ViewPager)rootView.findViewById(R.id.pager); mAdapter = new MyFragmentPagerAdapter1(getFragmentManager()); new setAdapterTask().execute(); After that, we add a class for the adapterTask private class setAdapterTask extends AsyncTask<Void,Void,Void>{ protected Void doInBackground(Void... params) { return null; } @Override protected void onPostExecute(Void result) { mViewPager.setAdapter(mAdapter); } } And that's it ! Hope it will help someone

Categories : Android

Unable to get Robotium to work in Android Studio
As far as I can tell, you can't successfully run any tests from Android Studio yet (see How can I create tests in Android Studio?). You need to do it from the command line (note that you may need to clean first ./gradlew clean): To run the instrumentTests, use ./gradlew connectedInstrumentTest To run your test task, use ./gradlew localTest For future reference when Android Studio works better with test integration, you can set it up to run any given Gradle task. Go to 'Edit Configurations' and click the '+' button to add a new one. Choose 'Gradle' and then configure it to point to the correct gradle.build file and the task you want to run. I'm not sure what you would add in the 'Before launch' section, however, if anything. All that being said, here's how I got my robotium tests to run

Categories : Android

Android Studio proguard doesn't work
I'm not sure because I didn't use Android Studio to build a release apk yet, but try to look at this http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Running-ProGuard You probably need to configure gradle to use proguard, considering that android studio is using it to build

Categories : Android

Phonegap 3 doesn't work with Android Studio
Upon must digging I found how to get past this: phonegap run android Its as simple as that. [Edit] You need to add platform to work with, whilst the documentation is so very very poor: C:varwwwsexdiaries.co.uksexdiaries>phonegap build android [phonegap] detecting Android SDK environment... [phonegap] using the local environment [phonegap] adding the Android platform... [warning] missing library cordova/android/3.0.0 [phonegap] downloading https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=snapshot;h=3.0.0;sf=tgz... [phonegap] compiling Android... [phonegap] successfully compiled Android app Then you are good to go, doing an import with Andriod Studio will also work now as you have a project to work with :) Fantastic.

Categories : Android

How do you view the project tree in Android Studio v0.2.x?
It happened to me too, in this link it says something about upgrading: Windows users: Do not install Android Studio 0.2.x in the same location as 0.1.x. Doing so may cause errors such as ClassCastException or other unexpected behaviors. It's best if you remove your previous version of Android Studio 0.1.x. I fixed it uninstalling my currend Android Studio installation, removing the folder where it was installed with the remaining files, and installing it again. It works correctly now apparently.

Categories : Android

How to setup Android Studio to work completely offline?
Ok guys finally I overcome to this problem here is the solution. 1: Download the gradle-1.6-bin.zip for offline use. 2: Now paste it in the C:Usersusername.gradle directory. 3: Open the AndroidStudio and click on the Create New Project option and you will not get this error any more while offline. But you can get another error like me or some other erro like this... Don't worry just ignore it. Your new project with your Specified name has been created. So now click on the Import Project and go to the path C:/users/username/AndroidStudioProject and open your project and you are done.

Categories : Android

Graphical view of layout in intellij Idea for android studio?
If you open any layout file, the switch will be displayed as tabs at the bottom: Note that you need to have Android Designer plug-in enabled: It's also important to open the files from the src/main/res/layout directory, not from the build directory. If you open a file under build, latest Android Studio will display a warning on the top of the file: Files under the build folder are generated and should not be edited.

Categories : Android

Android studio nullpointer warnings/notice in code view
Warning is not an Error. And the warning which you are talking about says "it may produce", don't say 'it must produce'. So choice is yours. Either add null check or not So, If you are sure that findViewById in your code will never be cause of NPE, then don't add the null check.

Categories : Android

How to get `scroll at bottom` and `scroll at top` of a list view of a Sencha Touch list view?
I do not use Architect, but what you need is get a ref of your list in controller, and attach an handler for the scroll event of the scroller object in the initialize event of the list: Controller config: { refs: { list: '...', ... }, control: { list: { initialize: 'onListInit' }, ... }, ... }, onListInit: function() { var scroller = this.getScrollable().getScroller(); scroller.on('scrollstart', this.onNnListScrollStart, this); scroller.on('scrollend', this.onNnListScrollEnd, this); }, onNnListScrollStart: function(scroller, x, y) { console.log('START SCROLL'); }, onNnListScrollEnd: function(scroller, x, y) { console.log('scroll x:'+x); console.log('scroll y:'+y); var bottom = scroll

Categories : Extjs

Library projects in Android Studio only work if nested in the project tree?
Every step are here : How do I add a library project to the Android Studio? If you want to more about gradle see the Google I/O conference by Xavier Ducrohet on youtube : http://www.youtube.com/watch?v=LCJAgPkpmR0

Categories : Android

Scroll view scroll indicator visible despite being turned off
The horizontal and vertical indicators are type of UIImageView by default. So, if you want to remove it permanently then do this //Assuming myScrollView is of type UIScrollView - (void)viewDidLoad { [super viewDidLoad]; for(UIView *subview in myScrollView.subviews){ [subview removeFromSuperview]; } }

Categories : IOS

How to scroll another view based on ListView scroll
In your xml layout file, just enclose the part of the xml that you want to scroll in <ScrollView></ScrollView> tags. eg <TextView //android properties /> <ScrollView //scrollview properties > <EditText //android properties /> </ScrollView> The EditText is scrolleble and the textview stationary

Categories : Android

scroll view doesnt scroll as expected
You seem to be missing a LinearLayout tag at the end. You start the file with a parent LinearLayout declaration, and never have an ending </LinearLayout> tag to match it. Try adding </LinearLayout> to the very end, right after </ScrollView>.

Categories : Android

2 different scroll view on same window & scroll @different speed
The scrollview on top should have a delegate that knows about both scrollviews. Inside that delegate you should implement the method: -(void)scrollViewDidScroll:(UIScrollView *)scrollView { [bottomScrollView setContentOffset:(CGPoint) animated:(BOOL)] } Then you will have to calculate how slowly you would like to scroll the second scrollview. Set the CGpoint based of a fraction of the top scrollview's content offset.

Categories : IOS

Scroll a Scroll View which contains Edit Text
You can use YOURSCROLLVIEW.scrollTo(int x, int y) or YOURSCROLLVIEW.smoothScrollTo(int x, int y) to move the scroll view to the appropriate coordinates so that the edit text box and keyboard are both shown. More information about these functions and other scrollview functions can be found on the android developer reference page.

Categories : Android

How to implement scrollview in android layout XML ?? I want to implement scroll view for my task switcher within button 7 !How do i do it
Implement the ScrollView using like this.. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hello" /> <Button android:id="@+id/scrollup" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Scroll Up" />

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.