在我的应用程序中,我需要使用地理编码,但我不太清楚该使用哪种方法。直到昨天,我向 URL 添加了参数maps.googleapis.com/maps/api/geocode/json?address=myparameter&sensor=false,但 Google 阻止了我的请求一天,导致应用程序崩溃,因为它没有从地理编码请求返回任何结果。
现在我正在使用Geocoder执行相同操作的类,并且我还看到您可以创建和使用 API 密钥进行地理编码。
您建议使用哪种方法?除了请求的限制之外,这两种方法有什么区别?
我为我的英语道歉,但用谷歌翻译.我需要帮助我的应用程序,我使用具有3种不同布局的ExpandableListView但我遇到了问题,我没有在各种论坛上找到答案.基本上,如果方法getChildView()检查convertView是否为null,我会偏移所有布局,甚至我多次重复它们.如果我没有进行检查,你会看到它应该的布局,但如果我点击另一个组或者你没有用EditText来显示布局,那么EditText中的值会被删除.我希望我足够清楚,我希望答案同样清楚,不幸的是我一直在互联网上,但找不到我想要的答案.在此先感谢那些会帮助我的人
public View getChildView(int groupPosition, final int childPosition,
boolean isLastChild, View convertView, ViewGroup parent) {
View view = convertView;
ViewHolder holder;
if (view == null) {
holder = new ViewHolder();
if (groupPosition == 0) {
convertView = infalInflater.inflate(R.layout.adv_item, null);
holder.btn1 = (ImageButton) convertView
.findViewById(R.id.button1);
holder.btn2 = (ImageButton) convertView
.findViewById(R.id.button2);
holder.btn3 = (ImageButton) convertView
.findViewById(R.id.button3);
holder.et1 = (EditText) convertView.findViewById(R.id.editText1);
holder.et2 = (EditText) convertView.findViewById(R.id.editText2);
holder.et3 = (EditText) convertView.findViewById(R.id.editText3);
holder.et4 = (EditText) convertView.findViewById(R.id.editText4);
holder.et5 = (EditText) convertView.findViewById(R.id.editText5);
holder.et6 = (EditText) convertView.findViewById(R.id.editText6);
holder.check_sc1 = …Run Code Online (Sandbox Code Playgroud) android expandablelistview expandablelistadapter android-layout
android ×2