ThumbnailMenu
?????????? Fragment ???????????? Fragment ???????????
Preview
Usage
?? tmlibrary module, ?????? com.hitomi.tmlibrary ???? java ????????
??????
<com.hitomi.tmlibrary.ThumbnailMenu
android:id="@+id/thumb"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:menu_direction="right">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/profile_background">
</RelativeLayout> </com.hitomi.tmlibrary.ThumbnailMenu>
RelativeLayout ?????????????
Activity ??
Fragment1 fragment1 = new Fragment1();
Fragment2 fragment2 = new Fragment2();
Fragment3 fragment3 = new Fragment3();
Fragment4 fragment4 = new Fragment4();
Fragment5 fragment5 = new Fragment5();
fragmentList.add(fragment5);
fragmentList.add(fragment4);
fragmentList.add(fragment3);
fragmentList.add(fragment2);
fragmentList.add(fragment1);
FragmentPagerAdapter adapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
public Fragment getItem(int position) {
return fragmentList.get(position);
}
@Override
public int getCount() {
return fragmentList.size();
}
}
; thumMenu.setAdapter(adapter);
Attributes
<attr name="menu_direction" format="enum">
<enum name="left" value="1000" />
<enum name="bottom" value="1001" />
<enum name="right" value="1002" /> </attr> ??????:
left :?????????
bottom : ?????????
right : ????????? <attr name="scale_ratio" format="float" /> ??????????
scale_ratio ???? 0.1f ? 1.0f ???
#Licence
MIT