public abstract class URIContentHandler extends java.lang.Object implements URIContent
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
uri |
Modifier | Constructor and Description |
---|---|
protected |
URIContentHandler(java.lang.String uri) |
Modifier and Type | Method and Description |
---|---|
abstract void |
deleteContent()
Delete content from ATAK
This may kick off a delete task or do nothing if the content
isn't imported or deletion is N/A
|
abstract android.graphics.drawable.Drawable |
getIcon()
Get an icon that represents this content
|
int |
getIconColor()
Get the icon color filter (white by default)
|
android.graphics.drawable.Drawable |
getIconDrawable()
Icon for this content
|
android.widget.PopupMenu |
getMenu(android.view.View anchor)
Create/get a menu for any actions associated with this content
The menu may be used as a container for menu items/actions and not
necessarily displayed as-is to the user.
|
abstract java.lang.String |
getTitle()
Get a title that represents this content
|
java.lang.String |
getURI()
Get a URI that represents this content
|
android.view.View |
getView(android.view.View convertView,
android.view.ViewGroup parent)
Create/get a view that represents this content
Arguments are optional and may be null (for use with recycler views)
|
MetaDataHolder |
getViewState()
Allow for retrieval name/value dataset associated with this content view
|
abstract void |
importContent()
Import content into ATAK
This may kick off an import task or simply do nothing if
the content is already imported or import is N/A
|
boolean |
isActionSupported(java.lang.Class<?> action)
Check if an action with a given class is supported by this handler
Besides the "instance of" check, this call may return false if a handler
only supports a given action under other conditions
i.e.
|
void |
setViewState(MetaDataHolder metaData)
Allow for setting of the name/value dataset associated with this content view
|
public java.lang.String getURI()
URIContent
getURI
in interface URIContent
public abstract void importContent()
public abstract void deleteContent()
public abstract java.lang.String getTitle()
getTitle
in interface URIContent
public abstract android.graphics.drawable.Drawable getIcon()
public android.graphics.drawable.Drawable getIconDrawable()
URIContent
getIconDrawable
in interface URIContent
public int getIconColor()
getIconColor
in interface URIContent
public android.view.View getView(android.view.View convertView, android.view.ViewGroup parent)
convertView
- The existing content viewparent
- The parent viewpublic android.widget.PopupMenu getMenu(android.view.View anchor)
PopupMenu.OnMenuItemClickListener.onMenuItemClick(android.view.MenuItem)
then overriders shouldn't assume the menu item IDs will be consistent
due to potential context mismatch issues. Consider checking actions
using MenuItem.getTitle()
anchor
- View anchor where this menu will be displayed
May be null if the caller is using the menu as a containerpublic MetaDataHolder getViewState()
public void setViewState(MetaDataHolder metaData)
metaData
- the metaData used to populate the view. The view is only populated
when this method is called. Subsequent changes to this holder will have no effect
on the visual content of the view unless the setViewState is called again. The view
can be recycled from the view returned from getViewState();public boolean isActionSupported(java.lang.Class<?> action)
action
- Action class