thanks, I update the xml layout to match your example and still doing the
same thing,
Now here is my code as it stands now and everything is returned, but not
scrolling as expected.
package MyProject.Maintenance;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.app.Activity;
import android.os.Bundle;
import android.os.StrictMode;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;
public class HistoryActivity extends Activity
{
private static final String SOAP_ACTION = "
http://www.mywebservice.com/Services/Provided";
private static final String METHOD_NAME = "Provided";
private static final String WSDL_TARGET_NAMESPACE = "
http://www. mywebservice.com /Services/";
private static final String URL = "http://www.
mywebservice.com /Services/AppServices.asmx?wsdl";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
TextView textView = new TextView(this);
setContentView(textView);
textView.setMovementMethod(new
ScrollingMovementMethod());
StrictMode.setThreadPolicy(new
StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.build());
SoapObject request = new
SoapObject(WSDL_TARGET_NAMESPACE,METHOD_NAME);
PropertyInfo email = new PropertyInfo();
String emailAddress = "[email protected]";
email.setName("email");
email.setValue(emailAddress);
request.addProperty(email);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new
HttpTransportSE(URL);
try
{
httpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject)envelope.bodyIn;
if(response != null)
{
SoapObject nameResult = (SoapObject)
response.getProperty(0);
SoapObject serviceRecords = (SoapObject)
nameResult.getProperty(1);
//Returns all records in table
SoapObject dar = (SoapObject)
serviceRecords.getProperty(0);
int recCount = dar.getPropertyCount();
textView.setText("Soap Response:\n\n" +
dar.toString() + "\n\nRecord Count: " + recCount);
StringBuilder sb = new StringBuilder();
for (int i=0;i<recCount;i++)
{
SoapObject suvas =
(SoapObject) dar.getProperty(i);
String ex =
suvas.getProperty("ep").toString();
String sd =
suvas.getProperty("sd").toString();
String dp =
suvas.getProperty("dp").toString();
sb.append("Service Date: "
+ sd + "\n" + "Expected Payment: $" + ex + "\n" + "Date Paid: " + dp +
"\n\n");
}
textView.setText(sb.toString());
}
}
catch (Exception exception)
{
textView.setText(exception.toString());
}
}
}
On Tue, Apr 30, 2013 at 4:32 PM, bob <[email protected]> wrote:
> I've tested this layout:
>
> *<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"*
> * android:layout_width="fill_parent"*
> * android:layout_height="fill_parent" >*
> *
> *
> * <TextView*
> * android:id="@+id/tv"*
> * android:layout_width="wrap_content"*
> * android:layout_height="wrap_content"*
> * android:text="@string/hello_world" />*
> *
> *
> *</ScrollView>*
>
> with this code:
>
> * @Override*
> * protected void onCreate(Bundle savedInstanceState) {*
> * super.onCreate(savedInstanceState);*
> * setContentView(R.layout.activity_main);*
> *
> *
> * TextView tv = (TextView) findViewById(R.id.tv);*
> * for (int ctr = 0; ctr < 100; ctr++)*
> * tv.append(ctr + ". text\n");*
> * }*
>
>
> It scrolls correctly. In other words, "flinging" works.
>
> Thanks.
>
>
>
> On Monday, April 29, 2013 9:35:25 AM UTC-5, Dan Cha wrote:
>>
>> I have an app i have a textview control on and lists out my data, when i
>> swipe the screen up or down, it only moves while i have my finger on the
>> screen.
>> I would like to be able to swipe like other apps that it just scrolls
>> until it slows down.
>>
>> What controls should i be using to accomplish this task?
>>
>>
>>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.