这三件事有什么区别?
据我所理解:
Bootstrap是一个库,可以帮助您在网页上使用漂亮的预制元素
Dart是另一种语言,它可以帮助您比使用JS制作的应用程序更快地创建应用程序(但可以转换为JS)
Polymer就像bootstrap,但是让你创建所有这些元素(bootstrap是ready元素的集合,但Polymer允许你创建自定义元素)
我理解正确吗?它们之间有什么区别?
我尝试使用XML API将文件上传到Google云端存储.我为每次上传生成了正确的GoogleAccessId,到期日期和签名.奇怪的是我可以使用Postman(Chrome应用程序)PUT文件,所以我确定网址没问题.我只是不能使用我的Android Java程序(它返回给我403错误).执行上传的源代码在此处(基于以下内容:https://cloud.google.com/storage/docs/access-control#Signing-Strings):
URL url;
HttpURLConnection connection;
try {
url = new URL("http://google-testbucket.storage.googleapis.com/testdata.txt?GoogleAccessId=1234567890123@developer.gserviceaccount.com&Expires=1331155464&Signature=BClz9e4UA2MRRDX62TPd8sNpUCxVsqUDG3YGPWvPcwN%2BmWBPqwgUYcOSszCPlgWREeF7oPGowkeKk7J4WApzkzxERdOQmAdrvshKSzUHg8Jqp1lw9tbiJfE2ExdOOIoJVmGLoDeAGnfzCd4fTsWcLbal9sFpqXsQI8IQi1493mw%3D");
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod("PUT");
OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
out.write("Test");
out.close();
Log.i("TAG", "PUT Response code: " + connection.getResponseCode());
} catch (MalformedURLException e) {
e.printStackTrace();
Log.e("TAG", "MalformedURLException");
} catch (ProtocolException e) {
e.printStackTrace();
Log.e("TAG", "ProtocolException");
} catch (IOException e) {
e.printStackTrace();
Log.e("TAG", "IOException");
}
Run Code Online (Sandbox Code Playgroud)
PUT对象的文档:https://cloud.google.com/storage/docs/xml-api/put-object-upload
任何人都可以调查这个问题,并告诉我这个问题可能出现什么问题?
我正在尝试AutoCompleteTextView使用我的自定义填充ArrayAdapter.我认为添加显示值可以正常工作.唯一的问题是没有显示下拉列表.有人知道如何看到这个下拉列表吗?每次我都会看到下拉列表,我可以看到日志消息说:
DisplayListCanvas:DisplayListCanvas在未绑定的RenderNode上启动(没有mOwningView)
我的适配器代码:
public class UserSearchAdapter extends ArrayAdapter<Profile> {
Context context;
ArrayList profiles;
public UserSearchAdapter(Context context, int resource, ArrayList<Profile> objects) {
super(context, resource, objects);
this.context = context;
this.profiles = objects;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(this.getContext())
.inflate(R.layout.single_user_item, parent, false);
}
Profile profile = (Profile) profiles.get(position);
TextView text = (TextView) convertView.findViewById(R.id.single_user_name_text);
text.setText(profile.getDisplayName());
return convertView;
}
}
Run Code Online (Sandbox Code Playgroud)
我的MainActivity代码:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_member_supervisor); …Run Code Online (Sandbox Code Playgroud)