-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ModelView] - Add code to support set layout params manually from init (
#1114) * [ModelView] - Add code to support set layout params manually from initialize of view * [ModelView] - Remove redundant code * [Ktlint] Fix fail ktlint check * [ModelView] - Update code create, fix naming and add test for manual layout params model view * [Docs+Test] - Clean docs and fix unit test for epoxy-processortest
- Loading branch information
Showing
7 changed files
with
397 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
epoxy-processortest/src/test/resources/AutoLayoutModelViewManualLayoutParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.airbnb.epoxy; | ||
|
||
import android.content.Context; | ||
import android.view.View; | ||
import android.view.ViewGroup.LayoutParams; | ||
|
||
import com.airbnb.epoxy.ModelView.Size; | ||
|
||
@ModelView(autoLayout = Size.MANUAL) | ||
public class AutoLayoutModelViewManualLayoutParams extends View { | ||
|
||
public AutoLayoutModelViewManualLayoutParams(Context context) { | ||
super(context); | ||
setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); | ||
} | ||
|
||
@ModelProp | ||
void setValue(int value) { | ||
|
||
} | ||
} |
Oops, something went wrong.