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