我是android新手.
我刚刚用一个文本栏和2个按钮做了一个新的布局,但它没有用,我发布了堆栈跟踪和我的相对布局文件有什么想法吗?我在那里看到了同样的问题,即减少抽出尺寸.但它对我的情况没有帮助,或者我现在没有太多关于如何减少它.这是我的一些堆栈跟踪:
D/AndroidRuntime(1192): Shutting down VM
W/dalvikvm(1192): threadid=1: thread exiting with uncaught exception (group=0xb60cc4f0)
E/AndroidRuntime(1192): FATAL EXCEPTION: main
E/AndroidRuntime(1192): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hellomissworld/com.example.hellomissworld.MainActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.RelativeLayout
E/AndroidRuntime(1192):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-24 18:58:31.451: E/AndroidRuntime(1192): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-24 18:58:31.451: E/AndroidRuntime(1192): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-24 18:58:31.451: E/AndroidRuntime(1192): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
Run Code Online (Sandbox Code Playgroud)
这是布局的xml文件:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@layout/activity_main"
android:focusable="false"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_marginTop="24dp"
android:ems="10"
android:inputType="text" >
<requestFocus />
</EditText>
<TextView …Run Code Online (Sandbox Code Playgroud) 我已经在c#中创建了一个程序,它显示了2种类型的表单1从用户获取值并将其保存在数据库中,其次是在水晶报表的模板中显示这些值.
我的问题是当我将第一个表单移动到第二个表单时,我使用hide()隐藏第一个表单; 函数和从数据库获取第二个表单上的值后我移回到第一个表单并隐藏第二个表单并显示第一个但是当我关闭整个程序时它继续运行并且调试器显示其运行并且还在任务管理器中有一个进程.
我想知道如何关闭form1关闭后台进程.对不起,我的英语不好.
rollno = txtrollno.Text;
ReportCard objreport = new ReportCard();
objreport.Show();
this.Hide();
Run Code Online (Sandbox Code Playgroud)
这是隐藏第一个表单的代码.
Form1 objshow = new Form1();
objshow.Show();
this.Hide();
Run Code Online (Sandbox Code Playgroud)
在这个我隐藏第二并再次显示第一.
我在visual studio 2010中编写了一个c ++代码,作为我的大三学生的一个例子
#include <iostream>
using namespace std;
int main()
{
cout<< "How are Your";
}
Run Code Online (Sandbox Code Playgroud)
我不明白这个程序如何构建和执行没有return语句,如果任何人可以为我解释?