@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>AcademicR</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.academicr"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="15"
|
||||
android:targetSdkVersion="15" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".Relation"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".hop2"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".hop3"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".WellcomeActivity"
|
||||
android:label="@string/title_activity_wellcome" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.academicr"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="15"
|
||||
android:targetSdkVersion="15" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".Relation"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".hop2"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".hop3"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".WellcomeActivity"
|
||||
android:label="@string/title_activity_wellcome" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
After Width: | Height: | Size: 830 KiB |
After Width: | Height: | Size: 831 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 480 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 485 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 280 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,6 @@
|
||||
/** Automatically generated file. DO NOT MODIFY */
|
||||
package com.example.academicr;
|
||||
|
||||
public final class BuildConfig {
|
||||
public final static boolean DEBUG = true;
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package com.example.academicr;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class dimen {
|
||||
/** Default screen margins, per the Android Design guidelines.
|
||||
|
||||
Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
|
||||
|
||||
*/
|
||||
public static final int activity_horizontal_margin=0x7f040000;
|
||||
public static final int activity_vertical_margin=0x7f040001;
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int button_style=0x7f020000;
|
||||
public static final int button_style2=0x7f020001;
|
||||
public static final int hop2=0x7f020002;
|
||||
public static final int hop3=0x7f020003;
|
||||
public static final int hop31=0x7f020004;
|
||||
public static final int ic_launcher=0x7f020005;
|
||||
public static final int text_style=0x7f020006;
|
||||
public static final int wellcome=0x7f020007;
|
||||
public static final int wellcome1=0x7f020008;
|
||||
public static final int wellcome11=0x7f020009;
|
||||
public static final int wellcome2=0x7f02000a;
|
||||
public static final int wellcome3=0x7f02000b;
|
||||
public static final int wellcome4=0x7f02000c;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int action_settings=0x7f080012;
|
||||
public static final int button1=0x7f080003;
|
||||
public static final int button11=0x7f08000e;
|
||||
public static final int button12=0x7f080009;
|
||||
public static final int button13=0x7f08000a;
|
||||
public static final int button21=0x7f08000b;
|
||||
public static final int button22=0x7f08000c;
|
||||
public static final int button23=0x7f08000d;
|
||||
public static final int editText1=0x7f080001;
|
||||
public static final int editText2=0x7f080002;
|
||||
public static final int endid=0x7f080008;
|
||||
public static final int hop2=0x7f080005;
|
||||
public static final int hop3=0x7f080006;
|
||||
public static final int point1=0x7f08000f;
|
||||
public static final int point2=0x7f080010;
|
||||
public static final int point3=0x7f080011;
|
||||
public static final int startid=0x7f080007;
|
||||
public static final int textView1=0x7f080000;
|
||||
public static final int versionNumber=0x7f080004;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int activity_main=0x7f030000;
|
||||
public static final int activity_wellcome=0x7f030001;
|
||||
public static final int decide=0x7f030002;
|
||||
public static final int hopthree=0x7f030003;
|
||||
public static final int hoptwo=0x7f030004;
|
||||
}
|
||||
public static final class menu {
|
||||
public static final int main=0x7f070000;
|
||||
public static final int wellcome=0x7f070001;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int action_settings=0x7f050002;
|
||||
public static final int app_name=0x7f050000;
|
||||
public static final int hello_world=0x7f050001;
|
||||
public static final int title_activity_wellcome=0x7f050003;
|
||||
}
|
||||
public static final class style {
|
||||
/**
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
|
||||
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
|
||||
|
||||
Base application theme for API 11+. This theme completely replaces
|
||||
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
||||
|
||||
API 11 theme customizations can go here.
|
||||
|
||||
Base application theme for API 14+. This theme completely replaces
|
||||
AppBaseTheme from BOTH res/values/styles.xml and
|
||||
res/values-v11/styles.xml on API 14+ devices.
|
||||
|
||||
API 14 theme customizations can go here.
|
||||
*/
|
||||
public static final int AppBaseTheme=0x7f060000;
|
||||
/** Application theme.
|
||||
All customizations that are NOT specific to a particular API-level can go here.
|
||||
*/
|
||||
public static final int AppTheme=0x7f060001;
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 50 KiB |
@ -0,0 +1,20 @@
|
||||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
@ -0,0 +1,14 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-15
|
After Width: | Height: | Size: 918 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 7.5 KiB |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false" android:color="#FFFFFF"/>
|
||||
<item android:state_pressed="true" android:color="#000000"/>
|
||||
<item android:color="#FFFFFF"/>
|
||||
</selector>
|
After Width: | Height: | Size: 780 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 682 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 208 KiB |
After Width: | Height: | Size: 321 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,54 @@
|
||||
<RelativeLayout 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: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="com.example.academicr.MainActivity" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="26dp"
|
||||
android:text="Please Input Two Authors"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/editText2"
|
||||
android:layout_below="@+id/textView1"
|
||||
android:layout_marginTop="44dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/editText2"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="65dp"
|
||||
android:background="@drawable/button_style"
|
||||
android:text="START"
|
||||
android:textColor="@drawable/text_style" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/editText1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="43dp"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName" />
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/wellcome" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/versionNumber"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:text="version 1.0" />
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="65dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:text="Hom Many Hops?"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textSize="26dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/hop2"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:text="2 hops"
|
||||
android:textColor="@drawable/text_style"
|
||||
android:background="@drawable/button_style"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/hop3"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:text="3 hops"
|
||||
android:textColor="@drawable/text_style"
|
||||
android:background="@drawable/button_style"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/hop3"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startid"
|
||||
android:singleLine="false" android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="30dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="startId"
|
||||
android:textSize="50px"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endid"
|
||||
android:singleLine="false" android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="500dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="endId"
|
||||
android:textSize="50px"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/button12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="160dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="1234567890"
|
||||
android:textSize="40px"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/button_style2"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/button13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="160dp"
|
||||
android:layout_y="240dp"
|
||||
android:text="1234567890"
|
||||
android:textSize="40px"
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/button_style2"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/button21"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="315dp"
|
||||
android:layout_y="50dp"
|
||||
android:text="1234567890"
|
||||
android:textSize="40px"
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/button_style2"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="315dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="1234567890"
|
||||
android:textSize="40px"
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/button_style2"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button23"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="315dp"
|
||||
android:layout_y="240dp"
|
||||
android:text="1234567890"
|
||||
android:textSize="40px"
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/button_style2"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="160dp"
|
||||
android:layout_y="50dp"
|
||||
android:text="1234567890"
|
||||
android:textSize="40px"
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/button_style2"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
|
||||
</AbsoluteLayout>
|
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/hop2"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startid"
|
||||
android:singleLine="false" android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="30dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="startId"
|
||||
android:textSize="50px"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endid"
|
||||
android:singleLine="false" android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="500dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="endId"
|
||||
android:textSize="50px"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
|
||||
android:id="@+id/point1"
|
||||
android:textSize="40px"
|
||||
android:singleLine="false" android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="200dp"
|
||||
android:layout_y="50dp"
|
||||
android:text="distributed representation of words and phrases and their compositionality"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/point2"
|
||||
android:textSize="40px"
|
||||
android:singleLine="false" android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="200dp"
|
||||
android:layout_y="150dp"
|
||||
android:text="distributed representation of words and phrases and their compositionality"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/point3"
|
||||
android:textSize="40px"
|
||||
android:singleLine="false" android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_x="200dp"
|
||||
android:layout_y="250dp"
|
||||
android:text="distributed representation of words and phrases and their compositionality"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
</AbsoluteLayout>
|
@ -0,0 +1,11 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.example.academicr.MainActivity" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_settings"/>
|
||||
|
||||
</menu>
|
@ -0,0 +1,11 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.example.academicr.WellcomeActivity" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_settings"/>
|
||||
|
||||
</menu>
|
@ -0,0 +1,11 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 11+. This theme completely replaces
|
||||
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
|
||||
<!-- API 11 theme customizations can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -0,0 +1,12 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 14+. This theme completely replaces
|
||||
AppBaseTheme from BOTH res/values/styles.xml and
|
||||
res/values-v11/styles.xml on API 14+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<!-- API 14 theme customizations can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -0,0 +1,10 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
|
||||
-->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
|
||||
</resources>
|
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
</resources>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">AcademicR</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_wellcome">WellcomeActivity</string>
|
||||
|
||||
</resources>
|
@ -0,0 +1,20 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Light">
|
||||
<!--
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
-->
|
||||
</style>
|
||||
|
||||
<!-- Application theme. -->
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -0,0 +1,53 @@
|
||||
package com.example.academicr;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
Button startButton = (Button)findViewById(R.id.button1);
|
||||
startButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
Intent intent = new Intent(MainActivity.this, Relation.class);
|
||||
//Õâ¸öµØ·½ÐèÒª±£´æÁãʱ
|
||||
EditText input1=(EditText)findViewById(R.id.editText1);
|
||||
EditText input2=(EditText)findViewById(R.id.editText2);
|
||||
intent.putExtra("input1", input1.getText().toString());
|
||||
intent.putExtra("input2", input2.getText().toString());
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.example.academicr;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class Relation extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.decide);
|
||||
Intent intent=getIntent();
|
||||
final String input1=intent.getStringExtra("input1");
|
||||
final String input2=intent.getStringExtra("input2");
|
||||
Button hopButton1 = (Button)findViewById(R.id.hop2);
|
||||
hopButton1.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
Intent intent = new Intent(Relation.this, hop2.class);
|
||||
//这个地方需要保存零时
|
||||
intent.putExtra("input1", input1);
|
||||
intent.putExtra("input2", input2);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
Button hopButton3 = (Button)findViewById(R.id.hop3);
|
||||
hopButton3.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
Intent intent = new Intent(Relation.this, hop3.class);
|
||||
//这个地方需要保存零时
|
||||
intent.putExtra("input1", input1);
|
||||
intent.putExtra("input2", input2);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.example.academicr;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class WellcomeActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);//Òþ²Ø±êÌâ
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//ÉèÖÃÈ«ÆÁ
|
||||
setContentView(R.layout.activity_wellcome);
|
||||
PackageManager pm = getPackageManager();
|
||||
try {
|
||||
PackageInfo pi = pm.getPackageInfo("com.lyt.android", 0);
|
||||
TextView versionNumber = (TextView) findViewById(R.id.versionNumber);
|
||||
versionNumber.setText("Version " + pi.versionName);
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
new Handler().postDelayed(new Runnable(){
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Intent intent = new Intent(WellcomeActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
WellcomeActivity.this.finish();
|
||||
}
|
||||
|
||||
}, 2500);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.wellcome, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.example.academicr;
|
||||
|
||||
|
||||
public class get{
|
||||
|
||||
private String s;
|
||||
|
||||
public String[] getname2(String input)//»ñÈ¡¶þÌø
|
||||
{
|
||||
s = input;
|
||||
int num = 0;//
|
||||
int numfor2=0;
|
||||
String[] name2 = new String[3];
|
||||
s = s.replace("[", "");
|
||||
//System.out.println(s);
|
||||
String[] sArray = s.split("],");
|
||||
//System.out.println(sArray[1]);
|
||||
for (int i = 0 ; i < sArray.length; i++)
|
||||
{
|
||||
|
||||
|
||||
sArray[i] = sArray[i].replace("]","");
|
||||
//System.out.println(sArray);
|
||||
String[] aArray = sArray[i].split(",");
|
||||
//System.out.println(aArray[1]);
|
||||
if ((aArray.length == 3)&&(num<=2))
|
||||
{
|
||||
num++;
|
||||
name2[numfor2]=aArray[1];
|
||||
numfor2++;
|
||||
}
|
||||
//System.out.println(aArray);
|
||||
|
||||
}
|
||||
if(name2.length<3)
|
||||
{for(int j = name2.length; j<3; j++)
|
||||
{name2[j]="NULL";};}
|
||||
return name2;
|
||||
}
|
||||
|
||||
|
||||
public String[] getname3(String input)//»ñÈ¡ÈýÌø
|
||||
{
|
||||
s = input;
|
||||
System.out.println(s);
|
||||
int num = 0;//
|
||||
int numfor2=0;
|
||||
String[] name3 = new String[6];
|
||||
s = s.replace("[", "");
|
||||
s = s.replace(" ", "");
|
||||
System.out.println("11111111111111111111111");
|
||||
//System.out.println(s);
|
||||
String[] sArray = s.split("],");
|
||||
//System.out.println(sArray[1]);
|
||||
System.out.println("222222222222222222222");
|
||||
for (int i = 0 ; i < sArray.length; i++)
|
||||
{
|
||||
System.out.println("3333333333333333333");
|
||||
sArray[i] = sArray[i].replace("]","");
|
||||
System.out.println(sArray[i]);
|
||||
//System.out.println(sArray);
|
||||
String[] aArray = sArray[i].split(",");
|
||||
//System.out.println(aArray[1]);
|
||||
if ((aArray.length == 4)&&(num<=2))
|
||||
{
|
||||
System.out.println("66666666666666666");
|
||||
num++;
|
||||
name3[numfor2]=aArray[1];
|
||||
name3[numfor2+1]=aArray[2];
|
||||
numfor2 = numfor2+2;
|
||||
}
|
||||
//System.out.println(aArray);
|
||||
|
||||
}
|
||||
System.out.println("4444444444444444444");
|
||||
System.out.println(name3.length);
|
||||
int k=5;
|
||||
while(name3[k]==null)
|
||||
{name3[k]="NULL";
|
||||
k--;System.out.println("777777777777777777");
|
||||
if(k==-1)break;}
|
||||
System.out.println("55555555555555555555555");
|
||||
System.out.println(name3[0]);
|
||||
return name3;
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,178 @@
|
||||
package com.example.academicr;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.StrictMode;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class hop2 extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//设置全屏
|
||||
setContentView(R.layout.hoptwo);
|
||||
if (android.os.Build.VERSION.SDK_INT > 9) {
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
StrictMode.setThreadPolicy(policy);
|
||||
}
|
||||
Intent intent=getIntent();
|
||||
String input1=intent.getStringExtra("input1");
|
||||
String input2=intent.getStringExtra("input2");
|
||||
|
||||
TextView startId = (TextView)findViewById(R.id.startid);
|
||||
TextView endId = (TextView)findViewById(R.id.endid);
|
||||
startId.setText(input1);
|
||||
endId.setText(input2);
|
||||
//http://edward.chinacloudapp.cn/bof333?id1=2094437628&id2=2273736245
|
||||
|
||||
|
||||
String result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
input1 = input1.replace(" ", "%20");
|
||||
input2 = input2.replace(" ", "%20");
|
||||
URL url = new URL("http://45.62.110.239:8080/bof333?id1="+input1+"&id2="+input2);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
//int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(result);
|
||||
|
||||
//String[] name;
|
||||
//name=getname2(result);
|
||||
get get1=new get();
|
||||
String[] name;
|
||||
name=get1.getname2(result);
|
||||
System.out.println(name[0]);
|
||||
//String[] name1;
|
||||
//name1=getname3(result);
|
||||
|
||||
TextView point1 = (TextView)findViewById(R.id.point1);
|
||||
TextView point2 = (TextView)findViewById(R.id.point2);
|
||||
TextView point3 = (TextView)findViewById(R.id.point3);
|
||||
point1.setText(name[0]);
|
||||
point2.setText(name[1]);
|
||||
point3.setText(name[2]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String[] getname3(String input)//获取三跳
|
||||
{
|
||||
//s = input;
|
||||
int num = 0;//
|
||||
int numfor2=0;
|
||||
String[] name3 = new String[6];
|
||||
input = input.replace("[", "");
|
||||
//System.out.println(s);
|
||||
String[] sArray = input.split("],");
|
||||
//System.out.println(sArray[1]);
|
||||
|
||||
for (int i = 0 ; i < sArray.length; i++)
|
||||
{
|
||||
|
||||
sArray[i] = sArray[i].replace("]","");
|
||||
//System.out.println(sArray);
|
||||
String[] aArray = sArray[i].split(",");
|
||||
//System.out.println(aArray[1]);
|
||||
if ((aArray.length == 4)&&(num<=2))
|
||||
{
|
||||
num++;
|
||||
name3[numfor2]=aArray[1];
|
||||
name3[numfor2+1]=aArray[2];
|
||||
numfor2 = numfor2+2;
|
||||
}
|
||||
//System.out.println(aArray);
|
||||
|
||||
}
|
||||
if(name3.length<6)
|
||||
{for(int j = name3.length; j<6; j++)
|
||||
{name3[j]="NULL";};}
|
||||
return name3;
|
||||
}
|
||||
|
||||
|
||||
public String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
|
||||
Reader reader = null;
|
||||
reader = new InputStreamReader(stream, "UTF-8");
|
||||
char[] buffer = new char[len];
|
||||
reader.read(buffer);
|
||||
return new String(buffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
/**
|
||||
* 设置为横屏
|
||||
*/
|
||||
if(getRequestedOrientation()!=ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE){
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
}
|
||||
super.onResume();
|
||||
}
|
||||
}
|
@ -0,0 +1,494 @@
|
||||
package com.example.academicr;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.StrictMode;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class hop3 extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//设置全屏
|
||||
setContentView(R.layout.hopthree);
|
||||
if (android.os.Build.VERSION.SDK_INT > 9) {
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
StrictMode.setThreadPolicy(policy);
|
||||
}
|
||||
Intent intent=getIntent();
|
||||
String input1=intent.getStringExtra("input1");
|
||||
String input2=intent.getStringExtra("input2");
|
||||
|
||||
TextView startId = (TextView)findViewById(R.id.startid);
|
||||
TextView endId = (TextView)findViewById(R.id.endid);
|
||||
startId.setText(input1);
|
||||
endId.setText(input2);
|
||||
|
||||
|
||||
|
||||
|
||||
String result3 = null;
|
||||
int len = 5000;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
input1 = input1.replace(" ", "%20");
|
||||
input2 = input2.replace(" ", "%20");
|
||||
URL url = new URL("http://45.62.110.239:8080/bof333?id1="+input1+"&id2="+input2);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
//int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
result3 = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(result3);
|
||||
|
||||
//final String[] name;
|
||||
//name=getname3(result3);
|
||||
get get2=new get();
|
||||
final String[] name;
|
||||
name=get2.getname3(result3);
|
||||
System.out.println(name[0]);
|
||||
//String[] name1;
|
||||
//name1=getname3(result);
|
||||
|
||||
/*TextView point11 = (TextView)findViewById(R.id.button11);
|
||||
TextView point12 = (TextView)findViewById(R.id.button12);
|
||||
TextView point13 = (TextView)findViewById(R.id.button13);
|
||||
TextView point21 = (TextView)findViewById(R.id.button21);
|
||||
TextView point22 = (TextView)findViewById(R.id.button22);
|
||||
TextView point23 = (TextView)findViewById(R.id.button23);
|
||||
point11.setText(name[0]);
|
||||
point12.setText(name[1]);
|
||||
point13.setText(name[2]);
|
||||
point21.setText(name[3]);
|
||||
point22.setText(name[4]);
|
||||
point23.setText(name[5]);*/
|
||||
|
||||
Button Button11 = (Button)findViewById(R.id.button11);
|
||||
Button11.setText(name[0]);
|
||||
Button11.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
//这个地方需要保存零时
|
||||
|
||||
String paper_result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
|
||||
URL url = new URL("http://45.62.110.239:8080/paper?id="+name[0]);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
paper_result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
new AlertDialog.Builder(hop3.this)
|
||||
.setTitle("Paper ID : "+ name[0])
|
||||
.setMessage(paper_result)
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing - it will close on its own
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
Button Button12 = (Button)findViewById(R.id.button12);
|
||||
Button12.setText(name[0]);
|
||||
Button12.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
//这个地方需要保存零时
|
||||
|
||||
String paper_result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
|
||||
URL url = new URL("http://45.62.110.239:8080/paper?id="+name[1]);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
paper_result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
new AlertDialog.Builder(hop3.this)
|
||||
.setTitle("Paper ID : "+ name[1])
|
||||
.setMessage(paper_result)
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing - it will close on its own
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Button Button13 = (Button)findViewById(R.id.button13);
|
||||
Button13.setText(name[2]);
|
||||
Button13.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
//这个地方需要保存零时
|
||||
|
||||
String paper_result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
|
||||
URL url = new URL("http://45.62.110.239:8080/paper?id="+name[2]);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
paper_result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
new AlertDialog.Builder(hop3.this)
|
||||
.setTitle("Paper ID : "+ name[2])
|
||||
.setMessage(paper_result)
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing - it will close on its own
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Button Button21 = (Button)findViewById(R.id.button21);
|
||||
Button21.setText(name[3]);
|
||||
Button21.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
//这个地方需要保存零时
|
||||
|
||||
String paper_result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
|
||||
URL url = new URL("http://45.62.110.239:8080/paper?id="+name[3]);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
paper_result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
new AlertDialog.Builder(hop3.this)
|
||||
.setTitle("Paper ID : "+ name[3])
|
||||
.setMessage(paper_result)
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing - it will close on its own
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Button Button22 = (Button)findViewById(R.id.button22);
|
||||
Button22.setText(name[4]);
|
||||
Button22.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
//这个地方需要保存零时
|
||||
|
||||
String paper_result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
|
||||
URL url = new URL("http://45.62.110.239:8080/paper?id="+name[4]);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
paper_result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
new AlertDialog.Builder(hop3.this)
|
||||
.setTitle("Paper ID : "+ name[4])
|
||||
.setMessage(paper_result)
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing - it will close on its own
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Button Button23 = (Button)findViewById(R.id.button23);
|
||||
Button23.setText(name[5]);
|
||||
Button23.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
//这个地方需要保存零时
|
||||
|
||||
String paper_result = null;
|
||||
int len = 500;
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
|
||||
URL url = new URL("http://45.62.110.239:8080/paper?id="+name[5]);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setDoInput(true);
|
||||
// Starts the query
|
||||
conn.connect();
|
||||
int response = conn.getResponseCode();
|
||||
is = conn.getInputStream();
|
||||
// Convert the InputStream into a string
|
||||
paper_result = readIt(is, len);
|
||||
|
||||
// Makes sure that the InputStream is closed after the app is
|
||||
// finished using it.
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
new AlertDialog.Builder(hop3.this)
|
||||
.setTitle("Paper ID : "+ name[5])
|
||||
.setMessage(paper_result)
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing - it will close on its own
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
|
||||
Reader reader = null;
|
||||
reader = new InputStreamReader(stream, "UTF-8");
|
||||
char[] buffer = new char[len];
|
||||
reader.read(buffer);
|
||||
return new String(buffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
/**
|
||||
* 设置为横屏
|
||||
*/
|
||||
if(getRequestedOrientation()!=ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE){
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
}
|
||||
super.onResume();
|
||||
}
|
||||
}
|