baoyongzhang / baoyongzhang/ParcelableGenerator
静态内部类 不支持吗?
- Dominant language
- Java
- Stars
- 302
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
```
import com.baoyz.pg.Parcelable;
import com.google.gson.annotations.SerializedName;
@Parcelable
public class WeatherModel{
@SerializedName("weatherinfo")
private WeatherInfo weatherInfo;
public WeatherInfo getWeatherInfo() {
return weatherInfo;
}
public WeatherModel() {
}
public static class WeatherInfo{
private String city;
@SerializedName("cityid")
private String cityId;
private String weather;
private String ptime;
public String getCity() {
return city;
}
public String getWeather() {
return weather;
}
public String getPtime() {
return ptime;
}
public String getCityId() {
return cityId;
}
}
}
```
在activity 之间无法传递WeatherModel 在WeatherInfo上面无法添加@Parcelable 我在android studio 中我看到你在/build/intermediates下面生成了相应的WeatherModel 和 WeatherInfo 的parcelable类
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the WeatherModel and nested WeatherInfo example in the issue, then inspect the generated WeatherModel and WeatherInfo parcelable classes under /build/intermediates. Reproduce passing WeatherModel between activities and compare the generated classes with the static nested-class structure. Done means the example can be passed between activities successfully without annotating WeatherInfo separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100