Make Text View Editable upon longclick

by Srinivas VG » Tue, 05 Apr 2011 03:46:42 GMT


Sponsored Links
 Hi

I am new to android development. I was implementing a feature in
android where in upon long click of the Textview,it *should be
editable.upon long click of the contents set by textView,  I tried
in the listener method , I used the following:

textView.onEditorAction(MODE_WORLD_WRITEABLE)

But I was unable to perform the function...plz let me know if there
are any other approaches...

Thanks,
Srinivas

-- 



Re: Make Text View Editable upon longclick

by TreKing » Wed, 06 Apr 2011 01:06:55 GMT


 On Sat, Apr 2, 2011 at 11:00 PM, Srinivas VG




Swap the TextView out with an EditText.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Other Threads

1. Google TV Developers

Hey guys,

I'm sure some of you have heard about Google TV - I myself am e{*filter*}d
about the possibilities for Android apps in the living room. Being a
developer myself, I tried to find a community centered around Google
TV development and couldn't find one, so I started one. The site just
launched, but I think when the SDK is released, Android market is
opened, and the market for smart TVs grow, the developer community
will grow with it. Please join us at  http://www.***.com/  for
Google TV specific development.

- Chris

-- 

2. App Chooser not being shown when google browser is the default

I've seen a few other similar threads, but none that both matched my
problem and had answers, so sorry if this retreads familiar ground.

I've got a browser and I'm trying to catch the same intents as the
google browser. I've even gone so far as to copy and paste them
directly from Froyo's browser. They are listed down below for
reference. However, when I try to send an intent to create the chooser
so the user can select my browser as the default it does not always
appear. Here is the code for creating the intent:

Intent anIntent = new Intent("android.intent.action.VIEW", "http://
www.google.com");
anIntent.addCategory(Intent.CATEGORY_BROWSABLE);
startActivity(anIntent);

and the logcat output:

08-26 14:53:25.698: INFO/ActivityManager(85): Starting activity:
Intent { act=android.intent.action.VIEW
cat=[android.intent.category.BROWSABLE] dat=http://www.google.com
cmp=com.android.browser/.BrowserActivity }

For some reason the intent is automatically resolving to Google's
browser unless one of the following is true:

1) I've cleared the defaults from the google browser via application
settings,
2) I've installed a third browser, or even just a HelloWorld app with
the intent-filters listed below, or
3) I'm running on a platform earlier than 2.2

What is really confusing is #2. It doesn't matter what that third app
is. I've used a default hello world with just the first intent-filter
and that's enough to trigger something behind the scenes that tells
Google it's no longer the only default browser. However, it's not
enough in my own app, and the only differences in the two manifests
are that mine has a sharedUserId, a couple of extra activities (none
of which have intent-filters) and permissions (none of which have
anything to do with browsing, in fact HelloWorld doesn't have any
permissions at all).

The program flow is: user opens browser, it sees that it's not fully
installed and opens another activity, that activity does some stuff
(none of which deals with intents) and then checks to see if my
browser is the default, if not it fires off the aforementioned intent
to create the chooser so the user can set the default.

Is there a change in froyo that would cause an application to not be
able to use startActivity with a generic intent that matches to its
own package? Or some other change to the way activities are resolved
or installed that broke the way preferred activities are defined? I
know that the PackageManager preferred activity functions have
changed, but I'm not using them at all.

----- the intent-filters -----
<intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="http" />
        <data android:scheme="https" />
        <data android:scheme="about" />
        <data android:scheme="javascript" />
</intent-filter>
<!--  For these schemes where any of these particular MIME types
          have been supplied, we are a good candidate. -->
<intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http" />
        <data android:scheme="https" />
        <data android:scheme="inline" />
        <data android:mimeType="text/html"/>
        <data android:mimeType="text/plain"/>
        <data android:mimeType="application/xhtml+xml"/>
        <data android:mimeType="application/vnd.wap.xhtml+xml"/>
</intent-filter>
<!-- We are also the main entry point of the browser. -->
<intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

-- 

3. Calling all developers who are passionate about health care

4. Testing several projects with a single test project

5. Plz remove me from this group than ksé”›

6. Setting focus programatically in ExpandableListView

7. Anyone updating their app recently notice unexpected drop in install percentage?