PlaceDetailsCompactFragment

public final class PlaceDetailsCompactFragment extends Fragment


A fragment that displays information about a place.

Summary

Nested types

Enumeration of all content types supported by PlaceDetailsCompactFragment.

Public fields

static final @NonNull <Error class: unknown class>

List containing all Content supported by the widget.

static final @NonNull <Error class: unknown class>

A list containing standard Content for the widget.

Public constructors

Public methods

final boolean

Whether content is truncated to fit into a single line.

final void

Loads details of the place with the specified place ID and displays it on the widget.

static final @NonNull PlaceDetailsCompactFragment

Returns a new instance of PlaceDetailsCompactFragment.

static final @NonNull PlaceDetailsCompactFragment
newInstance(
    @NonNull Orientation orientation,
    @NonNull List<@NonNull PlaceDetailsCompactFragment.Content> content,
    @StyleRes int theme
)

Returns a new instance of PlaceDetailsCompactFragment.

final void

Sets a listener to be invoked when a place is loaded into the widget or when the widget fails to load.

final void
setPreferTruncation(boolean preferTruncation)

Whether content is truncated to fit into a single line.

Inherited fields

From androidx.fragment.app.Fragment
final @Nullable String
@RestrictTo(value = [RestrictTo.Scope.LIBRARY])
mPreviousWho

Inherited methods

From androidx.fragment.app.Fragment
void
dump(
    @NonNull String p0,
    @Nullable FileDescriptor p1,
    @NonNull PrintWriter p2,
    @Nullable String[] p3
)
final boolean
final @Nullable FragmentActivity
boolean
boolean
final @Nullable Bundle
final @NonNull FragmentManager
@Nullable Context
@NonNull CreationExtras
@NonNull ViewModelProvider.Factory
@Nullable Object
@Nullable Object
final @Nullable FragmentManager

This method is deprecated. Deprecated in Java

final @Nullable Object
final int
final @NonNull LayoutInflater
@NonNull LayoutInflater
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX])
getLayoutInflater(@Nullable Bundle p0)

This method is deprecated. Deprecated in Java

@NonNull Lifecycle
@NonNull LoaderManager

This method is deprecated. Deprecated in Java

final @Nullable Fragment
final @NonNull FragmentManager
@Nullable Object
final @NonNull Resources
final boolean

This method is deprecated. Deprecated in Java

@Nullable Object
final @NonNull SavedStateRegistry
@Nullable Object
@Nullable Object
final @NonNull String
final @NonNull String
final @Nullable String
final @Nullable Fragment

This method is deprecated. Deprecated in Java

final int

This method is deprecated. Deprecated in Java

final @NonNull CharSequence
getText(@StringRes int p0)
boolean

This method is deprecated. Deprecated in Java

@Nullable View
@NonNull LifecycleOwner
@NonNull LiveData<@NonNull LifecycleOwner>
@NonNull ViewModelStore
final boolean
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX])
hasOptionsMenu()
final int
final boolean
final boolean
final boolean
final boolean
final boolean
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX])
isMenuVisible()
final boolean
final boolean
final boolean
final boolean
void

This method is deprecated. Deprecated in Java

void
onActivityResult(int p0, int p1, @Nullable Intent p2)

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
void

This method is deprecated. Deprecated in Java

void
boolean
@Nullable Animation
@MainThread
onCreateAnimation(int p0, boolean p1, int p2)
@Nullable Animator
@MainThread
onCreateAnimator(int p0, boolean p1, int p2)
void
void

This method is deprecated. Deprecated in Java

void
void

This method is deprecated. Deprecated in Java

void
void
@NonNull LayoutInflater
void
void

This method is deprecated. Deprecated in Java

void
void
void
boolean

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
void
void

This method is deprecated. Deprecated in Java

void
void
onRequestPermissionsResult(int p0, @NonNull String[] p1, @NonNull int[] p2)

This method is deprecated. Deprecated in Java

void
void
void
void
void
void
final void
final @NonNull ActivityResultLauncher<@NonNull I>
@MainThread
<I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull ActivityResultCallback<@NonNull O> callback
)
final @NonNull ActivityResultLauncher<@NonNull I>
@MainThread
<I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull ActivityResultRegistry registry,
    @NonNull ActivityResultCallback<@NonNull O> callback
)
void
final void
requestPermissions(@NonNull String[] p0, int p1)

This method is deprecated. Deprecated in Java

final @NonNull FragmentActivity
final @NonNull Bundle
final @NonNull Context
final @NonNull FragmentManager

This method is deprecated. Deprecated in Java

final @NonNull Object
final @NonNull Fragment
final @NonNull View
void
void
void
void
void
void
void
void
setHasOptionsMenu(boolean p0)

This method is deprecated. Deprecated in Java

void
void
setMenuVisibility(boolean p0)
void
void
setRetainInstance(boolean p0)

This method is deprecated. Deprecated in Java

void
void
void
void

This method is deprecated. Deprecated in Java

void
setUserVisibleHint(boolean p0)

This method is deprecated. Deprecated in Java

boolean
void
void
void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
startIntentSenderForResult(
    @NonNull IntentSender p0,
    int p1,
    @Nullable Intent p2,
    int p3,
    int p4,
    int p5,
    @Nullable Bundle p6
)

This method is deprecated. Deprecated in Java

void
@NonNull String
void

Public fields

ALL_CONTENT

public static final @NonNull <Error class: unknown class> ALL_CONTENT

List containing all Content supported by the widget. This can be passed into the widget's newInstance function to show all content on the widget.

STANDARD_CONTENT

public static final @NonNull <Error class: unknown class> STANDARD_CONTENT

A list containing standard Content for the widget. This can be passed into the widget's newInstance function to show standard content on the widget.

Public constructors

PlaceDetailsCompactFragment

public PlaceDetailsCompactFragment()

Public methods

getPreferTruncation

public final boolean getPreferTruncation()

Whether content is truncated to fit into a single line. Not all content may be truncatable to fit into a single line (like ratings).

loadPlaceDetails

public final void loadPlaceDetails(@NonNull String placeId)

Loads details of the place with the specified place ID and displays it on the widget.

newInstance

public static final @NonNull PlaceDetailsCompactFragment newInstance(
    @NonNull Orientation orientation,
    @NonNull List<@NonNull PlaceDetailsCompactFragment.Content> content
)

Returns a new instance of PlaceDetailsCompactFragment.

Parameters
@NonNull Orientation orientation

the Orientation to show the widget in.

@NonNull List<@NonNull PlaceDetailsCompactFragment.Content> content

a list of Content values to be shown on the widget.

newInstance

public static final @NonNull PlaceDetailsCompactFragment newInstance(
    @NonNull Orientation orientation,
    @NonNull List<@NonNull PlaceDetailsCompactFragment.Content> content,
    @StyleRes int theme
)

Returns a new instance of PlaceDetailsCompactFragment.

Parameters
@NonNull Orientation orientation

the Orientation to show the widget in.

@NonNull List<@NonNull PlaceDetailsCompactFragment.Content> content

a list of Content values to be shown on the widget.

@StyleRes int theme

a theme inherits from R.style.PlacesTheme and overrides theme attributes to customize the widget appearance.

setPlaceLoadListener

public final void setPlaceLoadListener(@NonNull PlaceLoadListener listener)

Sets a listener to be invoked when a place is loaded into the widget or when the widget fails to load.

setPreferTruncation

public final void setPreferTruncation(boolean preferTruncation)

Whether content is truncated to fit into a single line. Not all content may be truncatable to fit into a single line (like ratings).