我正在尝试访问行索引,如下所示:
var grid = $("#grid").data("kendoGrid");
alert(grid.select().index());
Run Code Online (Sandbox Code Playgroud)
我在这个jsfiddle链接中添加了我的代码.这个代码在我的系统中工作,我不知道为什么 deleteRecord()
没有在jsfiddle中调用方法,但这不是实际的问题.
在这里点击最后一行的取消按钮提醒消息时会将索引显示为8,但实际索引为4.每个按钮只给我错误的索引.
我试过谷歌的android-Camera2Basic示例应用程序.对于前置摄像头,我在Camera2BasicFragment中更改了一些代码.变化如下.
要切换到的前置摄像头我已经改变mCameraId = cameraId;
到mCameraId = "1";
在setUpCameraOutputs(int width, int height)
方法.
并添加如果条件在结束时setUpCameraOutputs(int width, int height)
,
if(mCameraId == null)
mCameraId = cameraId;
Run Code Online (Sandbox Code Playgroud)
此更改完美显示前置摄像头,但不选择照片.所以我换了
mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback,
mBackgroundHandler);
Run Code Online (Sandbox Code Playgroud)
至
captureStillPicture();
Run Code Online (Sandbox Code Playgroud)
在lockFocus()
.现在前置摄像头拍摄照片,但它看起来颠倒了.
例如:
我现在不知道该怎么办.
我的要求是使用camera2 api在两个摄像头中捕捉照片.所以,如果我做错了什么,请纠正我.
在某些设备中,此应用程序只需单击即可拍摄多张照片.
在Android 文档中他们说
在 API <= 28 上,使用 VOLUME_EXTERNAL
但这也需要 API 级别 29,并且它不会将媒体文件保存到 MediaStore 中。
MediaStore.Audio.Media.IS_PENDING
MediaStore.Video.Media.RELATIVE_PATH
MediaStore.Video.Media.DATE_TAKEN
Run Code Online (Sandbox Code Playgroud)
还需要 API 29,所以我觉得文档不清楚,或者有什么我错过的吗?以及如何在 Android 10 以下保存媒体文件。
如何使用GetX在 Flutter 中实现图像(侧边栏和导航菜单)中的设计?类似于网络上的选项卡。
我是android开发的新手.我正在尝试创建一个包含微调器,编辑文本和复选框的List.微调器和复选框的数据来自数据库.我有以下文件.
NewTransac class which extends ListActivity {
private PayDbAdapter mDbHelper;
private Spinner paySpinner;
private CheckBox mCheckBox;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.new_transac_listview);
mDbHelper = new PayDbAdapter(this);
mDbHelper.open();
populatedata();
}
private void populatedata() {
paySpinner = (Spinner)findViewById(R.id.payerspinner);
mCheckBox = (CheckBox)findViewById(R.id.paidforcheckboxname);
Cursor mCursor = mDbHelper.fetchAllTransactionValue();
startManagingCursor(mCursor);
// Create an array to specify the fields we want to display in the list.
String[] from = new String[]{PayDbAdapter.KEY_NAME};
int[] to = new int[]{android.R.id.text1};
int[] cbto = new int[]{R.id.paidforcheckboxname};
// Now create a …
Run Code Online (Sandbox Code Playgroud) 我需要用不同的菜单打开两侧的导航视图.另外我需要更改导航图标(目前有三条水平线).如果我可以通过单独的按钮单击打开nav_view
并且na_view2
这些按钮在我的工具栏中可用,或者我需要知道如何在两侧设置单独的图标,这样会更好.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer1" />
</android.support.v4.widget.DrawerLayout>
Run Code Online (Sandbox Code Playgroud)
任何帮助都会非常值得一提.
我已经创建了这样的进度对话框
public VolleyService(Context context, VolleyServiceCompletedListener listener){
this.context = context;
pDialog = new ProgressDialog(context);
pDialog.setMessage("Loading...");
pDialog.setCancelable(false);
this.listener = listener;
}
Run Code Online (Sandbox Code Playgroud)
并尝试使用此方法显示进度对话框.
private void showProgressDialog() {
boolean isShowing = pDialog.isShowing();
if (!isShowing)
pDialog.show();
}
Run Code Online (Sandbox Code Playgroud)
并使用此方法隐藏对话框.
private void hideProgressDialog() {
if (pDialog.isShowing()) {
pDialog.hide();
}
}
Run Code Online (Sandbox Code Playgroud)
pDialog.isShowing()
即使在我调用之后,问题也会返回true pDialog.hide()
.当我看到hide()
方法时,android.app.Dialog.java
他们没有将mShowing
变量赋值为false,但是当我调用show()
它们时,它们将mShowing
变量赋值为true.
那么他们有什么理由不做假的吗?我怎样才能再次打开相同的进度对话框?
今天我刚从ShapeableImageView
Material design 中尝试过,
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/GuidelineTop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.15" />
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/imgProfile"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="centerCrop"
app:strokeColor="@color/grey400"
app:strokeWidth="@dimen/dp3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:adjustViewBounds="true"
app:layout_constraintTop_toBottomOf="@+id/GuidelineTop"
app:shapeAppearanceOverlay="@style/circleImageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)
还有我的circleImageView
<style name="circleImageView" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
</style>
Run Code Online (Sandbox Code Playgroud)
这是示例屏幕截图。
如您所见,笔画在左侧、顶部、右侧、底部被截断。有什么我错过的吗?
是否可以像下面的图像一样进行进度条.
明星必须通过给予百分比来填补.任何帮助都会非常值得一提.谢谢.
我需要在recyclerview中修改滚动,如果用户只删除其中一个可见视图,我想在可用位置显示不可见的视图.我试过以下事情,
添加
android:overScrollMode="never"
Run Code Online (Sandbox Code Playgroud)
在xml上,和
recyclerView.setHasFixedSize(false);
Run Code Online (Sandbox Code Playgroud)
在Java上,但没有任何帮助,任何帮助将是非常值得注意的.
谢谢.
更新
我想禁用滚动选项,用户只能在删除其中一个可见项后才能看到隐藏项.
android ×8
camera ×1
canvas ×1
checkbox ×1
flutter ×1
flutter-getx ×1
html5 ×1
java ×1
javascript ×1
jquery ×1
kendo-grid ×1
kendo-ui ×1
listview ×1
mediastore ×1