我的应用程序允许用户按下按钮,打开相机,他们可以拍照,它将显示在图像视图中.如果用户在相机打开时按下或取消,我会关闭此强制 - 无法将结果ResultInfo {who = null,request = 1888,result = 0,data = null}发送到活动...所以我猜测结果= 0是我需要插入什么才能使此停止力关闭?
以下是我的代码.我知道我忘记了什么,但却无法弄清楚!(不可否认,我大约需要2周的时间学习android开发).谢谢你的帮助!
private static final int CAMERA_REQUEST = 1888;
private ImageView imageView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
this.imageView = (ImageView)this.findViewById(R.id.photostrippic1);
ImageView photoButton = (ImageView) this.findViewById(R.id.photostrippic1);
photoButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);
}
});
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == CAMERA_REQUEST) {
Bitmap photo = (Bitmap) data.getExtras().get("data");
imageView.setImageBitmap(photo);
}
Run Code Online (Sandbox Code Playgroud)
我想我会在那里需要一个"其他",但我不知道这样做.
下面是logcat …
从2天开始,当我在设备上运行我的应用程序时出现以下错误,但是它在模拟器上运行正常可以帮助我解决此错误吗?
E 3762 webcoreglue the real object has been deleted
E 3762 webcoreglue the real object has been deleted
E 3762 webcoreglue the real object has been deleted
E 3762 webcoreglue the real object has been deleted
Run Code Online (Sandbox Code Playgroud)
它通过我的应用程序登录到Facebook登录webview时发生.
登录对话框将在十分之一秒后出现,然后消失
有什么建议?谢谢 ..
我使用android警告对话框构建器将一些用户消息(String)显示为用户的弹出框.
现在,我的要求是消息框应该能够支持此消息的HTML格式.包括,此用户消息中可能返回了一个URL /链接.选择此链接应将当前应用程序置于后台并弹出手机的浏览器并将用户带到链接中的URL.关闭浏览器会将应用程序带回前台.
我怎样才能做到这一点?我可以使用相同的警报对话框构建器或任何其他可用选项吗?
我从osmdroid获得了这些代码或补丁,我决定请求你的帮助,因为我没有足够的知识来组合这些代码来解决我的问题,在离线地图上滚动限制.我在网上搜索,并修改了教程.老实说,我试图修改这些代码,但我没有找到任何进展.基本上我有mapnik的离线地图和一些叠加.我不知道在哪里正确放置这些代码.您的想法和修改将是一个很大的帮助,也有助于我继续我的项目,我想你的答案肯定会帮助其他人与我的未来相同的问题.我知道这很重要.谢谢你的时间,上帝保佑.
public void onCreate(Bundle savedInstanceState) {
...
...
m_mapView = (MapView) findViewById(R.id.mapview);
m_mapView.setTileSource(TileSourceFactory.MAPNIK);
}
Run Code Online (Sandbox Code Playgroud)
第一:BoundingBox
BoundingBoxE6 bbox = new BoundingBoxE6(9.37398, 123.33761, 9.23948, 123.25035);
this.setScrollableAreaLimit(bbox);
Run Code Online (Sandbox Code Playgroud)
第二:LimitScrollToGeographicArea.patch
Index: MapView.java
===================================================================
--- MapView.java (revision 944)
+++ MapView.java (working copy)
@@ -103,6 +103,8 @@
protected MapListener mListener;
+ protected Rect mScrollableAreaLimit;
+
// for speed (avoiding allocations)
private final Matrix mMatrix = new Matrix();
private final MapTileProviderBase mTileProvider;
@@ -505,6 +507,36 @@
mMapOverlay.setUseDataConnection(aMode);
}
+ /**
+ * Set the map to limit it's …Run Code Online (Sandbox Code Playgroud) 是否有任何Android类/ api,我可以通过它获得我的小区的当前无线电频率,无论是GSM还是CDMA.任何准则.谢谢
我面临一个奇怪的问题:
我的Html.fromHtml()源代码如下:
<strong>Terrible experience with Nikko hotel</strong><br />It was not easy to cancel booking. I called to cancel books, but they still chraged us two full days. A reason was we were late ten minutes in calling to cancel. They explained us very kindly that I can only cancel the first day. But they charged after then.\nSick."
Run Code Online (Sandbox Code Playgroud)
这是从json响应中检索的
现在,当我使用setText显示它时,如下所示:
commentbox.setText(Html.fromHtml(cmnt.getString("cmnt")));
Run Code Online (Sandbox Code Playgroud)
但我看到的输出如下:

为什么它给我斜体文字而不是粗体?
我有 agGrid,其中包含使用 refData 属性的列。它显示为“是”或“否”,但基础值为“1”或“0”。我想按数据过滤列,但按“是”或“否”过滤时没有给出任何结果。然而,当我输入基础数据(即 1 或 0)时,过滤器开始工作。
HTML 文件
<ag-grid-angular class="ag-theme-balham"
[rowData]="categoryRowData" [columnDefs]="categoryColDef" [domLayout]="domLayout"
(gridReady)="onGridReady($event)">
</ag-grid-angular>
Run Code Online (Sandbox Code Playgroud)
TS文件
export class CategoryComponent implements OnInit{
private domLayout;
private objCategoryEditor = {};
categoryColDef ;
constructor()
{
this.getCategoryMapping();
this.createCategoryColDefinition();
}
ngOnInit() {
this.domLayout = "autoHeight";
}
onGridReady(params: any) {
params.api.sizeColumnsToFit();
params.api.resetRowHeights();
}
createCategoryColDefinition() {
this.categoryColDef = [
{
headerName: 'Is Subcategory', field: 'IsSubcategoryText', resizable: true,filter:true,
editable: function (params: any) {
return true;
},
cellEditor: "agSelectCellEditor",
cellEditorParams: {
values: this.extractValues(this.objCategoryEditor),
},
refData: this.objCategoryEditor,
}
]}
getCategoryMapping() …Run Code Online (Sandbox Code Playgroud)