Commit 64a583570d8ca5b51a119f79265c40e7df00ce5a

Authored by perry.werneck@gmail.com
1 parent 78d910ef

Testando acesso à lib3270 via jni

src/android/res/layout/main.xml 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:layout_width="fill_parent"
  4 + android:layout_height="fill_parent"
  5 + android:orientation="vertical" >
  6 +
  7 + <TextView
  8 + android:id="@+id/text"
  9 + android:layout_width="fill_parent"
  10 + android:layout_height="wrap_content"
  11 + android:text="@string/hello" />
  12 +
  13 +</LinearLayout>
0 \ No newline at end of file 14 \ No newline at end of file
src/android/src/br/com/bb/pw3270/PW3270Activity.java
@@ -2,12 +2,22 @@ package br.com.bb.pw3270; @@ -2,12 +2,22 @@ package br.com.bb.pw3270;
2 2
3 import android.app.Activity; 3 import android.app.Activity;
4 import android.os.Bundle; 4 import android.os.Bundle;
  5 +import android.widget.TextView;
5 6
6 public class PW3270Activity extends Activity { 7 public class PW3270Activity extends Activity {
  8 +
  9 + lib3270 host;
  10 +
7 /** Called when the activity is first created. */ 11 /** Called when the activity is first created. */
8 @Override 12 @Override
9 public void onCreate(Bundle savedInstanceState) { 13 public void onCreate(Bundle savedInstanceState) {
10 super.onCreate(savedInstanceState); 14 super.onCreate(savedInstanceState);
11 setContentView(R.layout.main); 15 setContentView(R.layout.main);
  16 +
  17 + TextView text = (TextView) findViewById(R.id.text);
  18 +
  19 + host = new lib3270();
  20 +
  21 + text.setText(host.getVersion());
12 } 22 }
13 } 23 }
14 \ No newline at end of file 24 \ No newline at end of file