OsmAnd/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java

70 lines
1.6 KiB
Java
Raw Normal View History

2019-10-10 16:09:20 +02:00
package net.osmand.aidlapi.navdrawer;
2019-10-08 16:42:00 +02:00
import android.os.Bundle;
import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
2019-10-10 16:09:20 +02:00
import net.osmand.aidlapi.AidlParams;
2019-10-08 16:42:00 +02:00
public class NavDrawerHeaderParams extends AidlParams {
@NonNull
private String imageUri;
@NonNull
private String packageName;
@Nullable
private String intent;
@NonNull
public String getImageUri() {
return imageUri;
}
@NonNull
public String getPackageName() {
return packageName;
}
@Nullable
public String getIntent() {
return intent;
}
public NavDrawerHeaderParams(@NonNull String imageUri, @NonNull String packageName,
@Nullable String intent) {
this.imageUri = imageUri;
this.packageName = packageName;
this.intent = intent;
}
public NavDrawerHeaderParams(Parcel in) {
2019-10-10 13:49:47 +02:00
readFromParcel(in);
2019-10-08 16:42:00 +02:00
}
public static final Creator<NavDrawerHeaderParams> CREATOR = new Creator<NavDrawerHeaderParams>() {
@Override
public NavDrawerHeaderParams createFromParcel(Parcel in) {
return new NavDrawerHeaderParams(in);
}
@Override
public NavDrawerHeaderParams[] newArray(int size) {
return new NavDrawerHeaderParams[size];
}
};
@Override
protected void readFromBundle(Bundle bundle) {
imageUri = bundle.getString("imageUri", "");
packageName = bundle.getString("packageName", "");
intent = bundle.getString("intent");
}
@Override
public void writeToBundle(Bundle bundle) {
bundle.putString("imageUri", imageUri);
bundle.putString("packageName", packageName);
bundle.putString("intent", intent);
}
}