lag

android EditText lagging when typing text

心不动则不痛 提交于 2019-12-05 10:40:30
Im developing some sort of chat application, all goes wellm but im stuck with one problem. EditText lags, my android keyboard gets freezed on second or some whenever I type some letter in edittext. O din't really know what code to provide, because it's just a simple EditText box. Here's how i make it: linforbutton.add(new LinearLayout(this)); //linear layout on the bottom os creen for edittext and button RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); linforbutton.get

SQL Server: Lead/Lag analytic function across groups (and not within groups)

ぃ、小莉子 提交于 2019-12-05 03:53:51
Sorry for the long post, but I have provided copy & paste sample data and a possible solution approach below. The relevant part of the question is in the upper part of the post (above the horizontal rule). I have the following table Dt customer_id buy_time money_spent ------------------------------------------------- 2000-01-04 100 11:00:00.00 2 2000-01-05 100 16:00:00.00 1 2000-01-10 100 13:00:00.00 4 2000-01-10 100 14:00:00.00 3 2000-01-04 200 09:00:00.00 10 2000-01-06 200 10:00:00.00 11 2000-01-06 200 11:00:00.00 5 2000-01-10 200 08:00:00.00 20 and want a query to get this result set Dt Dt

Android SurfaceView slows if no touch events occur

£可爱£侵袭症+ 提交于 2019-12-05 02:11:27
问题 I am making a game and all is going well except for the game loop. I am using a SurfaceView and drawing 2D Sprites (Bitmaps). Currently the game is a ship moving through an asteroid field. The ship stays in the center of the screen and the phone is tilted in either direction to move the the asteroids (asteroids change location instead of player). New asteroids spawn as old ones fall off the screen creating an infinite asteroid field feeling. Running on my Nexus 5, I noticed that after about 3

Android - onStop() will be called with a delay

六月ゝ 毕业季﹏ 提交于 2019-12-05 01:34:57
I found my activities onStop() method will be called with a less than 10 seconds delay. I've never seen before this behavior. Note :- The activity is singleTop and it starts with Intent.FLAG_ACTIVITY_REORDER_TO_FRONT flag. Note :- I'm using Build Tools v23.0.2. The delay wasn't before and the method would be called immediately. I am guessing that you are starting another activity and you expect the current activity to receive an onStop() callback. According to the activity lifecycle , the onPause() method is called before the onStop(). In some cases onSaveInstance() is also called before the

ListView scroll lagging when images is shown?

北慕城南 提交于 2019-12-04 21:43:49
My listview lags when scrolling. It seems as the lazyload works but the lag happens everytime an image is shown. I'm using the imageLoader found here http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/ and this is my adapter: public class EventAdapter extends ArrayAdapter<Event>{ public ListImageLoader imageLoader; public DisplayImageOptions imgDispOpts; private ArrayList<Event> objects; public EventAdapter(Context context, int textViewResourceId, ArrayList<Event> objects,ListImageLoader imageLoader) { super(context, textViewResourceId, objects); this.objects =

decreasing sifr render time

孤人 提交于 2019-12-04 20:46:26
I'm using sifr for a few items on this page: http://blueprint.staging.dante-studios.com/public/templates/home.php unfortunately it seems that the rendering is very slow, does anyone have any idea of how to: a) speed up the rendering process b) hide all "to be sifr'd" items until all of them are ready? Here are a few suggestions: The Flash movie has the bold and italic and bold + italic glyphs embedded. If you don't need those, they're adding needless weight to the movie. Same goes for other characters. You could get rid of all JavaScript comments in the sifr-config file. Flash transparency is

ListView scrolling using UniversalImageDownloader not smooth

送分小仙女□ 提交于 2019-12-04 14:27:32
问题 I am using a ListView containing images. These images are loaded from the Internet inside the adapter. Therefore I am using the UniversalImageDownloader . Unfortunately the scrolling of the ListView "lags" for a short time as soon as I scroll down where new content has to be downloaded. I acutally expected behaviour like the ListView scrolls perfectly smooth, but the loading of the Image can of course take some more time - which should not effect the smoothness of scrolling. Furthermore, as I

R plm lag - what is the equivalent to L1.x in Stata?

允我心安 提交于 2019-12-04 14:09:26
问题 Using the plm package in R to fit a fixed-effects model, what is the correct syntax to add a lagged variable to the model? Similar to the 'L1.variable' command in Stata. Here is my attempt adding a lagged variable (this is a test model and it might not make sense): library(foreign) nlswork <- read.dta("http://www.stata-press.com/data/r11/nlswork.dta") pnlswork <- plm.data(nlswork, c('idcode', 'year')) ffe <- plm(ln_wage ~ ttl_exp+lag(wks_work,1) , model = 'within' , data = nlswork) summary

UITableView Lagging due to Shadows and Borders

可紊 提交于 2019-12-04 08:41:56
I have the following code to add a border colour and drop shadow to the background of my UITableViewCell. My problem is that this code causes a huge lag on the tableView itself. Please can you tell me how I can optimise my code, preventing the lag of the UITableView? if ([cell viewWithTag:012] == nil && comment.isReply == NO) { UIImageView *iv = [[[UIImageView alloc] initWithFrame:frame] autorelease]; [iv setImage:[UIImage imageNamed:@"paper"]]; [iv setTag:012]; [cell insertSubview:iv atIndex:0]; [iv.layer setBorderWidth:1.0]; [iv.layer setBorderColor:[[UIColor whiteColor] CGColor]]; [iv.layer

Android Studio slow performance

若如初见. 提交于 2019-12-03 21:44:28
I've updated Android Studio to version 2.3 yesterday and since after I'm experiencing a slow performance, it was working fine before, though slow when gradle building, but now it taking 100% of processors resources. What is the requirements for Android Studio to run smoothly? My computer runs Windows 7 x64, i7 core, with 8 cores, 10Gb of RAM Ruchi Tiwari Here you go with three easy steps to get Android Studio Fast : Step 1 : Open gradle.properties file of your app and add in two lines as follows... org.gradle.daemon=true org.gradle.parallel=true Step 2 : File —> Settings —> Compiler ——>