我有一个带引导程序的表单:
<form class="form-inline">
<div class="form-group barkodiK">
<input type="text" class="form-control barkodi" placeholder="Barkodi">
</div>
<div class="form-group produktiK">
<datalist id='produktet'></datalist>
<input list="produktet" class="form-control produkti" onkeyup="merrProduktet(this)" placeholder="Produkti">
</div>
<div class="form-group pershkrimiK">
<datalist id='pershkrimiProdukteve'></datalist>
<input list="pershkrimiProdukteve" class="form-control pershkrimi" placeholder="Pershkrimi">
</div>
<div class="form-group cmimiK">
<input type="text" class="form-control cmimi" readonly placeholder="Çmimi">
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
这个表格给了我这个结果:
但是,如果我在编辑器行中进行此更改,它也会更改结构:
<form class="form-inline">
<div class="form-group barkodiK">
<input type="text" class="form-control barkodi" placeholder="Barkodi">
</div>
<div class="form-group produktiK">
<datalist id='produktet'></datalist>
<input list="produktet" class="form-control produkti" onkeyup="merrProduktet(this)" placeholder="Produkti">
</div><div class="form-group pershkrimiK">
<datalist id='pershkrimiProdukteve'></datalist>
<input list="pershkrimiProdukteve" class="form-control pershkrimi" placeholder="Pershkrimi"> …Run Code Online (Sandbox Code Playgroud) 我为我的应用程序做了一个设计,但它运行得非常慢。我想要达到的结果是这样的:
到目前为止,我已经能够用这个 xml 实现这个结果:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.asteam.unify.Mbajtje">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:layout_marginRight="@dimen/general_margin"
android:layout_marginLeft="@dimen/general_margin">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lendaText"
android:layout_marginTop="@dimen/general_margin"
android:text="Lënda:"/>
<Spinner
android:id="@+id/lendaMbajtje"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lendaText"
android:textSize="@dimen/font_size"
android:background="@drawable/border_bottom"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/subjektiText"
android:layout_marginTop="@dimen/general_margin"
android:layout_below="@id/lendaMbajtje"
android:text="Subjekti:"/>
<Spinner
android:id="@+id/subjektiMbajtje"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/subjektiText"
android:textSize="@dimen/font_size"
android:background="@drawable/border_bottom"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/subjektiMbajtje"
android:id="@+id/detajetMbajtjesText"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginRight="@dimen/general_margin"
android:layout_weight="3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="Data e mbajtjes:"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:id="@+id/dates"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:orientation="horizontal">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/dayMbajtje"
android:background="@drawable/border_bottom" …Run Code Online (Sandbox Code Playgroud) 我有一个类Node如下:
public class Node
{
public Dictionary<string, string> dictionary;
public Node(Dictionary<string, string> dictionary)
{
this.dictionary = dictionary;
}
public void CreateNode()
{
this.dictionary.Add("1", "String1");
Dictionary<string, string> dictionary1 = new Dictionary<string, string>();
Console.WriteLine(this.dictionary["1"]);
Node tmp = new Node(dictionary1);
tmp.dictionary = this.dictionary;
Console.WriteLine(tmp.dictionary["1"]);
tmp.AddE(tmp, "String2","2");
Console.WriteLine(this.dictionary["2"]);
}
public void AddE(Node tmp,String text,string c)
{
tmp.dictionary.Add(c,text);
}
}
Run Code Online (Sandbox Code Playgroud)
Node有一个包含字符串键和值的字典,一个带参数的构造函数,一个CreateNode()方法,它将一个项添加到字典中并创建另一个Node.现在,在tmp.dictionary = this.dictionary之后; 在tmp.dictionary上添加了另一个项目,但是它也添加在this.dictionary中(我不希望发生这种情况,我很想丢失).
主要方法:
static void Main(string[] args)
{
Dictionary<string, string> dictionary …Run Code Online (Sandbox Code Playgroud)