PersonDetailActivity

public final class PersonDetailActivity extends AppCompatActivity

Constructors

Types

Link copied to clipboard
public class Companion

Properties

Link copied to clipboard

The see less button

Link copied to clipboard

The see more button

Link copied to clipboard
Link copied to clipboard
private final static String EXTRA_FACE_CROP

The extra key for the face crop

Link copied to clipboard
public final static String EXTRA_METADATA

The extra key for the metadata

Link copied to clipboard
private ImageView ivBack

The back button

Link copied to clipboard

The face thumbnail

Link copied to clipboard

The linear layout to show the fields

Link copied to clipboard

The linear layout to show the person detail

Link copied to clipboard

The title of the name field

Link copied to clipboard

The name of the person

Link copied to clipboard

The record id of the person

Functions

Link copied to clipboard

Create TextView to show key of metadata

Link copied to clipboard

Create TextView to show value of metadata

Link copied to clipboard
private final Unit displayMap(Map<String, String> myMap)

Dynamically create TextViews to show key and value of metadata

Link copied to clipboard

The see less button

Link copied to clipboard

The see more button

Link copied to clipboard
private final ImageView getIvBack()

The back button

Link copied to clipboard
private final ImageView getIvFaceThumbnail()

The face thumbnail

Link copied to clipboard
private final LinearLayout getLlFields()

The linear layout to show the fields

Link copied to clipboard

The linear layout to show the person detail

Link copied to clipboard
private final TextView getTvNameFieldTitle()

The title of the name field

Link copied to clipboard
private final TextView getTvNameFieldValue()

The name of the person

Link copied to clipboard
private final TextView getTvRecordId()

The record id of the person

Link copied to clipboard

Finish the activity when the back button is pressed

Link copied to clipboard
protected Unit onCreate(Bundle savedInstanceState)
Link copied to clipboard
private final Unit setBtnSeeLess(AppCompatButton btnSeeLess)

The see less button

Link copied to clipboard
private final Unit setBtnSeeMore(AppCompatButton btnSeeMore)

The see more button

Link copied to clipboard
private final Unit setIvBack(ImageView ivBack)

The back button

Link copied to clipboard
private final Unit setIvFaceThumbnail(ImageView ivFaceThumbnail)

The face thumbnail

Link copied to clipboard
private final Unit setLlFields(LinearLayout llFields)

The linear layout to show the fields

Link copied to clipboard
private final Unit setLlPersonDetail(LinearLayout llPersonDetail)

The linear layout to show the person detail

Link copied to clipboard
private final Unit setMetaData()

Bind metadata which is returned by server to the UI

Link copied to clipboard
private final Unit setTvNameFieldTitle(TextView tvNameFieldTitle)

The title of the name field

Link copied to clipboard
private final Unit setTvNameFieldValue(TextView tvNameFieldValue)

The name of the person

Link copied to clipboard
private final Unit setTvRecordId(TextView tvRecordId)

The record id of the person

Link copied to clipboard
private final Unit setupComponents()

This method is used to set up the components in this activity.

Link copied to clipboard
private final Unit setUpListeners()

Sets up the listeners for the UI components

Link copied to clipboard
private final Unit showSeeLessView()

Show the see less view (less fields are visible)

Link copied to clipboard
private final Unit showSeeMoreView()

Show the see more view (more fields are visible)

Link copied to clipboard
private final TreeMap<String, String> sortMap(Map<String, String> map)

Sort the metadata by keys