deprecated

android:singleLine of TextView is nolonger in the “Deprecated”?

拟墨画扇 提交于 2019-12-08 21:08:42
问题 I am facing a problem of android:ellipsize that doesn't work in TextView. But to work well for android:singleLine. I've heard that android:singleLine is "Deprecated", but it is not written in the reference in Android Developer. https://developer.android.com/reference/android/widget/TextView.html#attr_android:singleLine android:singleLine is no longer in the "Deprecated"? ADDED: I solved this problem myself. As it turns out, android:scrollHorizontally="true" of TextView's attribute is not

Alternative to poseAsClass in Mac OS X 10.5 and higher?

痴心易碎 提交于 2019-12-08 19:44:05
问题 Apple has deprecated NSObject 's poseAsClass: method for OS X v10.5 and above. Is there another way to make class posing work? 回答1: I don't think there is a class-level equivalent, but you can exchange the implementation of two methods, which was often the purpose of using poseAsClass: (of course, you can exchange more than one method if you need to override multiple methods in a class). You want method_exchangeImplementations in the Objective-C 2.0 runtime ( #import objc/runtime.h ). A word

After iOS 8, can I continue to use UIActionSheet and UIAlertView?

 ̄綄美尐妖づ 提交于 2019-12-08 19:10:42
问题 I have apps which use UIActionSheet and UIAlertView . In iOS8, Apple's documentation and some websites say that they are deprecated in iOS8. UIActionSheet documentation Important: UIActionSheet is deprecated in iOS 8. (Note that UIActionSheetDelegate is also deprecated.) To create and manage action sheets in iOS 8 and later, instead use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet. But in Xcode 6 with deployment target 8.0 does not generate warning for the use

MKPolylineView initWithPolyLine: is deprecated in iOS 7

こ雲淡風輕ζ 提交于 2019-12-08 16:37:37
问题 I am getting the following error: initWithPolyline : is deprecated: first deprecated in iOS 7.0 MKPolylineView *lineView = [[MKPolylineView alloc] initWithPolyline:overlay]; What is the replacement method of instead of this ? 回答1: See the documentation for initWithPolyline: . Read the Deprecation Statement which says to use an MKPolylineRenderer object instead. 回答2: You should use (MKOverlayRenderer *) type delegate instead of (MKOverlayView *) type delegate. And return MKPolylineRenderer

What is reverse of @deprecated in java [duplicate]

放肆的年华 提交于 2019-12-08 16:15:13
问题 This question already has an answer here : Annotating Unstable Classes/Methods for Javadoc (1 answer) Closed 3 years ago . So, People use @Deprecated annotation for APIs that have been deprecated. Is there any annotation that notifies users if the method is evolving and is not stable? 回答1: Afaik, it doesn't exist yet, you have to create your own. JEP277 define a @Deprecated(EXPERIMENTAL) , but it's just a proposition. 回答2: In hadoop there is InterfaceStability annotation for these purposes.

Why is Files.deleteDirectoryContents() deprecated in Guava?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 16:01:28
问题 In Guava 10+, Google deprecated Files.deleteDirectoryContents(). JavaDoc says Deprecated. This method suffers from poor symlink detection and race conditions. This functionality can be supported suitably only by shelling out to an operating system command such as rm -rf or del /s. This method is scheduled to be removed from Guava in Guava release 11.0 I am confused on why there is a race condition. I think having this method is actually useful and find shelling out to operating system a poor

Android Studio ignore deprecated

元气小坏坏 提交于 2019-12-08 11:54:21
问题 I moved my Eclispe project to Android Studio, but it outputs a lot of deprecated errors when built. I tried some methods, but they don't work. 回答1: Try placing this at the top of the methods: @SuppressWarnings("deprecation") Example @SuppressWarnings("deprecation") public void testMethod(){ ... } For a brief explaination go to this link: [What is @SuppressWarnings("deprecation") and ("unused") in Android? Update: It seems that there is also some known issues with deprecations. You might want

How to get a ViewModel?

旧时模样 提交于 2019-12-08 11:52:26
问题 I just want to get a reference in my Fragment (extends Fragment) to my ViewModel.class (extends from AndroidViewModel). This is how it is described everywhere: UserModel userModel = ViewModelProviders.of(getActivity()).get(UserModel.class); description on Android Developer ..., but ViewModelProviders is deprecated since long ago. *This class was deprecated in API level 1.1.0. * I can't import the class with: android.arch.lifecycle.[ViewModelProviders] it just offers ViewModelProvider and

IOS6 Deprecated Methods in Monotouch

一笑奈何 提交于 2019-12-08 06:49:44
问题 Our app is targeting ios5.1 right now. And after installing MT 6.0.2 the deprecated warnings filled the build logs. Should the deprecated methods be still kept in the source or should they be replaced? For instance, should I replace the following with: public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) { switch(toInterfaceOrientation) { case UIInterfaceOrientation.LandscapeLeft: case UIInterfaceOrientation.LandscapeRight: return true;

Delphi 5: Ideas for simulating “Obsolete” or “Deprecated” methods?

南楼画角 提交于 2019-12-08 06:41:00
问题 i want to mark a method as obsolete, but Delphi 5 doesn't have such a feature. For the sake of an example, here is a made-up method with it's deprecated and new preferred form: procedure TStormPeaksQuest.BlowHodirsHorn; overload; //obsolete procedure TStormPeaksQuest.BlowHodirsHorn(UseProtection: Boolean); overload; Note: For this hypothetical example, we assume that using the parameterless version is just plain bad. There are problems with not " using protection " - which have no good