当我点击android中的地图标记时,我正在使用自定义布局显示为Infowindow.

在上图中,当我在EditText上输入名称时,我确实观察到编辑文本没有被编辑,整个窗口被选中.如何在使用自定义布局时使字段在infowindow中可单击?
请建议我任何想法.请帮忙!!
任何人都可以帮忙吗?
我正在尝试使用 vba 将 Excel 数据转换为 xml 文件。我的 xml 文件看起来像这样,
<product>
<info><i>Samsung</i></info>
</product>
Run Code Online (Sandbox Code Playgroud)
我希望不解析 html 标签。因此尝试使用 vba 中的 createCDATASection 方法在 vba 中添加 cdata
我添加了这样的vba代码
Set objDom = New DOMDocument
Set objXMLRootelement = objDom.createElement("Product")
Set objXMLelement = objDom.createElement("info")
objXMLRootelement.appendChild objXMLelement
cdata=objDom.createCDATASection ("<i>Samsung</i>")
objXMLelement.text=cdata.text
Run Code Online (Sandbox Code Playgroud)
我希望我的 xml 文件看起来像这样,当在记事本中查看视图源时,它应该将
“<”显示为“<”,而不是“<”
<product>
<info><![CDATA[<i>Samsung</i>]]></info>
</product>
Run Code Online (Sandbox Code Playgroud)
执行我的代码后,它显示如下,
<product>
<info><i>Samsung</i></info>
</product>
Run Code Online (Sandbox Code Playgroud)
但是cdata标签没有出现。不知道原因。并且当在记事本中查看xml文件的源时,“<”符号显示为&符号lt;
有人可以解决这个问题吗?
提前致谢
我正在尝试使用AChartEngine库在sqlitedatabase中显示包含数据的图形.我在数据库中有两条记录.存在一条记录时显示BarChart图形.但是有两个数据记录,它说,"数据集和渲染器应该不为空,并且应该具有相同数量的系列".我不明白这一点.
我的代码是,
Button ReportGraph = (Button) findViewById(R.id.ReportGraph);
ReportGraph.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
GraphicalView GraphChartView = ChartFactory.getBarChartView(
getApplicationContext(), getWaterElectricityReading(),
getDemoRenderer(), Type.DEFAULT);
// Intent intent=ChartFactory.getLineChartIntent(this,
// getDemoDataset(), getDemoRenderer());
// startActivity(intent);
if (GraphChartView != null) {
GraphChartView.repaint();
}
relChartView.addView(GraphChartView);
mainLayout.setVisibility(View.GONE);
relChartView.setVisibility(View.VISIBLE);
}
});
private XYMultipleSeriesDataset getWaterElectricityReading() {
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-mm-dd", Locale.US);
SimpleDateFormat df2 = new SimpleDateFormat("MMM dd yyyy");
Date StartDate;
Date EndDate;
String Pastdateformat = "";
String CurrentDateFormat = "";
SQLiteDatabase DB …Run Code Online (Sandbox Code Playgroud) 我有一个对话框,其中包含两个edittextbox.

当我填写字段并单击提交按钮时,我需要将值保存在数据库中.我试图获取在字段中输入的值,但引发了空指针异常.
我的代码如下
View v = getLayoutInflater().inflate(R.layout.sample, null);
new AlertDialog.Builder(Context)
.setTitle(R.string.Details)
.setView(v)
.setNegativeButton(R.string.Cancel,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
}
})
.setPositiveButton(R.string.Submit,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
final EditText txtname=(EditText)findViewById(R.id.editText1);
final EditText txtnumber=(EditText)findViewById(R.id.editText2);
Save(txtname.getText().toString(),txtnumber.getText().toString());
}
Run Code Online (Sandbox Code Playgroud)
当我调试并检查时,它将txtname和txtnumber值显示为空.我哪里出错了?我正在使用布局来显示字段
布局是,
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TableRow>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Name" />
<EditText
android:id="@+id/editText1"
android:layout_width="195dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:ems="10"
android:hint="FirstName LastName"
android:inputType="textPersonName" />
</TableRow> …Run Code Online (Sandbox Code Playgroud) android ×3
achartengine ×1
cdata ×1
charts ×1
dialog ×1
excel ×1
google-maps ×1
infowindow ×1
vba ×1
xml ×1
xmldocument ×1