android.app.ListActivity Java Examples

The following examples show how to use android.app.ListActivity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_url_starting_with_slash_with_params() {
    Router router = new Router();
    router.map("/users/:user_id", ListActivity.class);

    Intent intent = router.intentFor("/users/4");
    Assert.assertEquals("4", intent.getExtras().getString("user_id"));
}
 
Example #2
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_basic() {
	Router router = new Router();
	router.map("users/:user_id", ListActivity.class);

	Intent intent = router.intentFor("users/4");
	Assert.assertEquals("4", intent.getExtras().getString("user_id"));
}
 
Example #3
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_empty() {
	Router router = new Router();
	router.map("users", ListActivity.class);

	Intent intent = router.intentFor("users");
	Assert.assertNull(intent.getExtras());
}
 
Example #4
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_url_starting_with_slash() {
    Router router = new Router();
    router.map("/users", ListActivity.class);

    Intent intent = router.intentFor("/users");
    Assert.assertNull(intent.getExtras());
}
 
Example #5
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_url_querystring() {
    Router router = new Router();
    router.map("/users/:id", ListActivity.class);

    Intent intent = router.intentFor("/users/123?key1=val2");
    Bundle extras = intent.getExtras();

    Assert.assertEquals("123", extras.getString("id"));
    Assert.assertEquals("val2", extras.getString("key1"));
}
 
Example #6
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_url_containing_spaces() {
    Router router = new Router();
    router.map("/path+entry/:id", ListActivity.class);

    Intent intent = router.intentFor("/path+entry/123");
    Bundle extras = intent.getExtras();

    Assert.assertEquals("123", extras.getString("id"));
}
 
Example #7
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_url_querystring_with_encoded_value() {
    Router router = new Router();
    router.map("/users/:id", ListActivity.class);

    Intent intent = router.intentFor("/users/123?key1=val+1&key2=val%202");
    Bundle extras = intent.getExtras();

    Assert.assertEquals("val 1", extras.getString("key1"));
    Assert.assertEquals("val 2", extras.getString("key2"));
}
 
Example #8
Source File: RouterTest.java    From routable-android with MIT License 5 votes vote down vote up
public void test_url_querystring_without_value() {
    Router router = new Router();
    router.map("/users/:id", ListActivity.class);

    Intent intent = router.intentFor("/users/123?val1");
    Bundle extras = intent.getExtras();

    Assert.assertTrue(extras.containsKey("val1"));
}
 
Example #9
Source File: ListActivityAssert.java    From assertj-android with Apache License 2.0 4 votes vote down vote up
public ListActivityAssert(ListActivity actual) {
  super(actual, ListActivityAssert.class);
}
 
Example #10
Source File: LoadPackagesAsyncTask.java    From ZXing-Standalone-library with Apache License 2.0 4 votes vote down vote up
LoadPackagesAsyncTask(ListActivity activity) {
  this.activity = activity;
}
 
Example #11
Source File: LoadPackagesAsyncTask.java    From BarcodeEye with Apache License 2.0 4 votes vote down vote up
LoadPackagesAsyncTask(ListActivity activity) {
  this.activity = activity;
}
 
Example #12
Source File: MultiChoiceAdapterHelperBase.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
public void checkActivity() {
    Context context = getContext();
    if (context instanceof ListActivity) {
        throw new RuntimeException("ListView cannot belong to an activity which subclasses ListActivity");
    }
}
 
Example #13
Source File: LoadPackagesAsyncTask.java    From zxingfragmentlib with Apache License 2.0 4 votes vote down vote up
LoadPackagesAsyncTask(ListActivity activity) {
  this.activity = activity;
}
 
Example #14
Source File: TickAdapter.java    From tickmate with GNU General Public License v3.0 4 votes vote down vote up
public void scrollToLatest() {
    int scrollposition = (isTodayAtTop) ? 0 : this.count - 1;
    ((ListActivity) context).getListView().smoothScrollToPositionFromTop(scrollposition, 1, 0);
}
 
Example #15
Source File: LoadPackagesAsyncTask.java    From Study_Android_Demo with Apache License 2.0 4 votes vote down vote up
LoadPackagesAsyncTask(ListActivity activity) {
  this.activity = activity;
}
 
Example #16
Source File: LoadPackagesAsyncTask.java    From weex with Apache License 2.0 4 votes vote down vote up
LoadPackagesAsyncTask(ListActivity activity) {
  this.activity = activity;
}
 
Example #17
Source File: MapListView.java    From here-android-sdk-examples with Apache License 2.0 4 votes vote down vote up
MapListView(ListActivity activity) {
    m_activity = activity;
    initMapEngine();
}
 
Example #18
Source File: LoadPackagesAsyncTask.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 4 votes vote down vote up
LoadPackagesAsyncTask(ListActivity activity) {
  this.activity = activity;
}
 
Example #19
Source File: ListTask.java    From listmyaps with Apache License 2.0 2 votes vote down vote up
/**
 * New task
 * 
 * @param listActivity
 *          the activity to report back to
 * @param layout
 *          layout id to pass to the AppAdaptier
 */
public ListTask(ListActivity listActivity, int layout) {
	this.listActivity = listActivity;
	this.layout = layout;
}