android:fix import error
This commit is contained in:
parent
bd28701bd7
commit
a75d132e2c
@ -15,9 +15,7 @@
|
||||
*/
|
||||
package pub.doric.loader;
|
||||
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -46,12 +44,12 @@ public class DoricHttpJSLoader implements IDoricJSLoader {
|
||||
final AsyncResult<String> ret = new AsyncResult<>();
|
||||
okHttpClient.newCall(new Request.Builder().url(scheme).build()).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(@NotNull Call call, @NotNull IOException e) {
|
||||
public void onFailure(@NonNull Call call, @NonNull IOException e) {
|
||||
ret.setError(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(@NotNull Call call, @NotNull Response response) {
|
||||
public void onResponse(@NonNull Call call, @NonNull Response response) {
|
||||
try {
|
||||
ret.setResult(response.body().string());
|
||||
} catch (Exception e) {
|
||||
|
@ -17,12 +17,13 @@ package pub.doric.plugin;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.github.pengfeizhou.jscore.JSONBuilder;
|
||||
import com.github.pengfeizhou.jscore.JSObject;
|
||||
import com.github.pengfeizhou.jscore.JSValue;
|
||||
import com.github.pengfeizhou.jscore.JavaValue;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -88,12 +89,12 @@ public class NetworkPlugin extends DoricJavaPlugin {
|
||||
}
|
||||
okHttpClient.newCall(requestBuilder.build()).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(@NotNull Call call, @NotNull IOException e) {
|
||||
public void onFailure(@NonNull Call call, @NonNull IOException e) {
|
||||
promise.reject(new JavaValue(e.getLocalizedMessage()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
|
||||
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
|
||||
JSONBuilder header = new JSONBuilder();
|
||||
for (String key : response.headers().names()) {
|
||||
header.put(key, response.headers().get(key));
|
||||
|
@ -26,7 +26,6 @@ import androidx.viewpager.widget.ViewPager;
|
||||
import com.github.pengfeizhou.jscore.JSObject;
|
||||
import com.github.pengfeizhou.jscore.JSValue;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -61,18 +60,18 @@ public class NestedSliderNode extends GroupNode<ViewPager> implements ViewPager.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewFromObject(@NonNull View view, @NotNull Object object) {
|
||||
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
|
||||
return view == object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(@NotNull ViewGroup container, int position, @NotNull Object object) {
|
||||
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
|
||||
container.removeView(slideItems.get(position));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@NonNull
|
||||
@Override
|
||||
public Object instantiateItem(@NotNull ViewGroup container, int position) {
|
||||
public Object instantiateItem(@NonNull ViewGroup container, int position) {
|
||||
container.addView(slideItems.get(position));
|
||||
return slideItems.get(position);
|
||||
}
|
||||
|
Reference in New Issue
Block a user