@@ -0,0 +1,2318 @@
+package com.example.bishe111;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport android.app.Activity;%0Aimport android.content.Intent;%0Aimport android.hardware.Sensor;%0Aimport android.hardware.SensorEvent;%0Aimport android.hardware.SensorEventListener;%0Aimport android.os.Bundle;%0Aimport android.util.Log;%0Aimport android.view.View;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0A%0Apublic class MainActivity extends Activity %7B%0A%09List_Demo list_Demo=%09new List_Demo();%0A%09@Override%0A%09protected void onCreate(Bundle savedInstanceState) %7B%0A%09%09super.onCreate(savedInstanceState);%0A%09%09setContentView(R.layout.activity_main);%0A%09%09list_Demo.add();%0A    Button button = (Button)findViewById(R.id.button6);%0A    button.setOnClickListener(new View.OnClickListener() %7B       %09%0A        %09@Override%0A     public void onClick(View v) %7B%0A%09%09      List%3CVertex%3E mudi_list=new ArrayList%3C%3E();%0A        %09final EditText editText = (EditText)findViewById(R.id.editText);%0A        %09final EditText editText1 = (EditText)findViewById(R.id.EditText_1);%0A        %09String input = editText1.getText().toString();%0A        %09Vertex head=null;%0A        %09Graph graph= new Graph(list_Demo.vertexs, list_Demo.edges);%0A        %09//%E5%87%BA%E5%8F%91%E7%82%B9%0A        %09Vertex input1 = new Vertex(input);%0A%09%09      head=input1;%0A       %09%09graph.initUnVisited(head);%0A       %09%09 //%E7%9B%AE%E7%9A%84%E5%9C%B0%0A        %09String%5B%5D str=new String%5B50%5D;%0A       %09%09String input_1 = editText.getText().toString();%0A        %09str=input_1.split(%22 %22);%0A        %09graph.setNum(str.length);      %0A       %09%09for(int i=0;i%3Cstr.length;i++)%0A        %09%7B%0A        %09%09for(int j=0;j%3Clist_Demo.vertexs.size();j++)%0A        %09%09%7B%0A        %09%09%09if(str%5Bi%5D.equals(list_Demo.vertexs.get(j).getName()))%0A        %09%09%09%7B%0A        %09%09%09%09list_Demo.vertexs.get(j).setIsClient(true);%0A        %09%09%09%7D%0A        %09%09%7D%0A       %09%09%7D%0A         %09//%E8%B0%83%E7%94%A8%E7%AE%97%E6%B3%95%0A        %09graph.search();%0A        %09//%E8%8E%B7%E5%BE%97%E7%9B%AE%E7%9A%84%E8%8A%82%E7%82%B9%0A        %09mudi_list=graph.getMudi();     %0A        %09//%E9%81%8D%E5%8E%86mudi%0A        %09StringBuffer ss1=new StringBuffer();       %0A        %09for(int i=0;i%3Cmudi_list.size();i++)%0A        %09%7B%0A        %09%09ss1.append(mudi_list.get(i).getName());%0A        %09%09ss1.append(%22 %22);%0A        %09%7D%0A        %09final String ss =ss1.toString();%0A          Intent intent = new Intent(MainActivity.this, SecondActivity.class);%0A          intent.putExtra(%22nameA%22, ss);%0A          startActivity(intent);%0A            %7D%0A        %7D);             %0A  %7D%0A%7D%0A%09%0A

Create MainActivity.java