General code refactoring
> Removing utility method for isAttachedToWindow > Moving logic to calculate cell size from workspace to DeviceProfile > Replacing some constants with xml resource variables > Saving the item info using content values for better compatibility with other methods Change-Id: Idd612633d97a6241cb31148df9466031374bd5a0
This commit is contained in:
@@ -529,16 +529,6 @@ public final class Utilities {
|
||||
return null;
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
||||
public static boolean isViewAttachedToWindow(View v) {
|
||||
if (ATLEAST_KITKAT) {
|
||||
return v.isAttachedToWindow();
|
||||
} else {
|
||||
// A proxy call which returns null, if the view is not attached to the window.
|
||||
return v.getKeyDispatcherState() != null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a widget with category {@link AppWidgetProviderInfo#WIDGET_CATEGORY_SEARCHBOX}
|
||||
* provided by the same package which is set to be global search activity.
|
||||
|
||||
Reference in New Issue
Block a user