Quantcast
Channel: User HaimS - Stack Overflow
Browsing all 19 articles
Browse latest View live
↧

Comment by HaimS on Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and...

Very useful script! Anyway, I would use 67% (instead of 66%) for xhdpi. That's because the ratio between xhdpi and xxhdpi is 2/3 which when looked in percentage and rounded gives 67. Otherwise, if one...

View Article


Comment by HaimS on What is the equivalent listview.setSelection in case of...

@Nonos - You should call scrollToPosition() whenever you want the recycler view to scroll to a specific item (that is not currently showing) by its position. Further, there is no point in calling...

View Article

Comment by HaimS on How to create different pendingintent so filterEquals()...

Careful: requestCode is defined as int whereas normally (sqlite) row IDs are long.

View Article

Comment by HaimS on Checkbox drawable with extra drawableLeft overlapping one...

@Halim android:layout_width="match_parent" doesn't solve the overlapping problem, but anyhow, I wouldn't want the checkbox width to be match_parent.

View Article

Comment by HaimS on NavigationDrawer activity doesn't keep keyboard's state...

My observations: 1. This issue is not seen in Gingerbread. 2. If a spinner drop-down menu is open, the keyboard state is restored correctly on rotation, so maybe a hacky workaround would be to create...

View Article


Comment by HaimS on Update multiple rows with different values in a single...

Looks good! One small correction though, since in the question the name of the column is "id" it should also appear in the answer. Replace "i" with "id" everywhere.

View Article

Comment by HaimS on Recycling views in a non-scrollable grid view inside...

This is an interesting idea and theoretically it almost solves my problem. The issue that remains is that this special view should be visualized as grid whereas the other views have width=match_parent....

View Article

Answer by HaimS for AsynctaskLoader reset state

"However, I still can't understand when an Asynctask is in the Reset State"I believe you meant "...when the LOADER is in the Rest State"Normally one would use the LoaerManager to manage the life-cycle...

View Article


Answer by HaimS for java.lang.IllegalStateException while opening an dialog...

Here is some background to help anyone who encounters this exception.The exception is thrown because the framework doesn't allow to commit a fragment transaction in the same call stack as...

View Article


Answer by HaimS for Can't change tag of fragment

This is an old question, but anyhow here is some information in the hope that it will help someone.ViewPager works together with its adapter which is set to it via ViewPager#setAdapter().In the case of...

View Article

Answer by HaimS for attribute insetForeground has already be defined

To elaborate on Omar's answer,The Android design support library introduced NavigationDrawer that is used together with DrawerLayout to provide means of implementing navigation etc. See here:Android...

View Article

Answer by HaimS for Do Settings/Help/Feedback actions belong in the...

Google's guideline regarding Settings location:"When a navigation drawer is accessible from the current screen, place Settings in the drawer. Otherwise, place Settings in an action overflow...

View Article

Recycling views in a non-scrollable grid view inside ScrollView

I have a ScrollView that contains several other views and I would like for one of these views to be a grid of other views having the same layout (e.g. ImageView).Since having one scrollable view inside...

View Article


Answer by HaimS for How to add buttons like refresh and search in ToolBar in...

To control the location of the title you may want to set a custom font as explained here (by twaddington): LinkThen to relocate the position of the text, in updateMeasureState() you would add...

View Article

Answer by HaimS for How to make an app to run automatically on startup with...

I would start an IntentService from the broadcast receiver and achieve the delay by sleeping inside onHandleIntent() before performing the heavy processing.The other answer suggests creating a thread...

View Article


Android studio shows sources from API of compileSdkVersion when debugging on...

I am debugging with Android Studio (A.S) 1.0.2 with compileSdkVersion 21 set up in build.gradle.When using an emulator with API 21 everything works fine.The problem occurs when debugging on a device...

View Article

Answer by HaimS for Always getting -1 in adding new wifiConfiguration to the...

addNetwork() returns -1 on failure.One common reason for it to fail is when the network was previously configured by the user (through the wifi setting screen) or programmatically, via an app with...

View Article


Answer by HaimS for Unable to programmatically attach file to an email intent...

Looks like gmail can't find the file you are trying to attach.It says: "FileNotFoundException when openAssetFileDescriptor"Make sure the file created here has a valid path to an existing file.File...

View Article

Answer by HaimS for FragmentManager(v4) not removing fragments from...

This issue is still relevant nowadays on androidx.fragment v1.10 (so Nov. 2019), so here's some insight to it.Assume setHasOptionsMenu() is called with a true value for a fragment f.When f is detached,...

View Article
Browsing all 19 articles
Browse latest View live