本文整理汇总了Java中com.sothree.slidinguppanel.SlidingUpPanelLayout.setPanelSlideListener方法的典型用法代码示例。如果您正苦于以下问题:Java SlidingUpPanelLayout.setPanelSlideListener方法的具体用法?Java SlidingUpPanelLayout.setPanelSlideListener怎么用?Java SlidingUpPanelLayout.setPanelSlideListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sothree.slidinguppanel.SlidingUpPanelLayout
的用法示例。
在下文中一共展示了SlidingUpPanelLayout.setPanelSlideListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View root = super
.onCreateView(inflater, container, savedInstanceState, R.layout.map_info_bottom);
mLayout = (SlidingUpPanelLayout) root.findViewById(R.id.map_bottomsheet);
mSlideableView = mLayout.findViewById(R.id.map_bottomsheet_slideable);
mLayout.setPanelSlideListener(mPanelSlideListener);
mLayout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
mLayout.setEnableDragViewTouchEvents(false);
// Collapse the panel when the dummy content view is touched
mPanelContent = root.findViewById(R.id.map_bottomsheet_dummycontent);
mPanelContent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
}
});
mPanelContent.setClickable(false);
return root;
}
示例2: onCreateView
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_map, container, false);
drawer = (SlidingUpPanelLayout)view.findViewById(R.id.sliding_layout);
drawer.setPanelSlideListener(new DrawerListener());
setUpMapIfNeeded();
if (savedInstanceState != null){
processBundle(savedInstanceState);
} else {
processBundle(getArguments());
}
return view;
}
示例3: initalizeOtherUI
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
protected void initalizeOtherUI() {
aslb_dragabe_test = (RelativeLayout) findViewById(R.id.aslib_dragview);
supl = (SlidingUpPanelLayout) findViewById(R.id.aslib_sliding_layout);
supl.setPanelSlideListener(this);
addviewtodrageview(aslb_dragabe_test);
}
示例4: onCreateView
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_map, container, false);
((FloatingActionButton) view.findViewById(R.id.myFAB)).setImageDrawable(new IconDrawable(getContext(), MaterialIcons.md_directions_walk).colorRes(R.color.white));
drawer = (SlidingUpPanelLayout)view.findViewById(R.id.sliding_layout);
drawer.setPanelSlideListener(new DrawerListener());
fab = (FloatingActionButton)view.findViewById(R.id.myFAB);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (selectedMarker != null) {
LatLng ll = selectedMarker.getPosition();
Uri directionsUri = Uri.parse("google.navigation:q=" + ll.latitude + "," + ll.longitude + "&mode=w");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, directionsUri);
startActivity(mapIntent);
}
}
});
setUpMapIfNeeded();
if (savedInstanceState != null){
processBundle(savedInstanceState);
} else {
processBundle(getArguments());
}
trolleyMan.startUpdates();
return view;
}
示例5: commitPlayerFragment
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
protected void commitPlayerFragment(int containerViewId) {
playerFragment = new PlayerFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(containerViewId, playerFragment);
transaction.commit();
slidingUpPanelLayout = (SlidingUpPanelLayout) findViewById(R.id.sliding_layout);
slidingUpPanelLayout.setPanelSlideListener(playerFragment);
hideSlidingUpFrameLayout();
}
示例6: onCreate
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//mListView = (ListView) findViewById(R.id.list);
//mListView.setOverScrollMode(ListView.OVER_SCROLL_NEVER);
mSlidingUpPanelLayout = (SlidingUpPanelLayout) findViewById(R.id.slidingLayout);
mSlidingUpPanelLayout.setEnableDragViewTouchEvents(true);
rlOrnek = (RelativeLayout)findViewById(R.id.rlOrnek);
int mapHeight = getResources().getDimensionPixelSize(R.dimen.map_height);
mSlidingUpPanelLayout.setPanelHeight(mapHeight); // you can use different height here
mSlidingUpPanelLayout.setScrollableView(rlOrnek, mapHeight);
mSlidingUpPanelLayout.setPanelSlideListener(this);
// transparent view at the top of ListView
mTransparentView = findViewById(R.id.transparentView);
// init header view for ListView
mTransparentHeaderView = LayoutInflater.from(this).inflate(R.layout.transparent_header_view, null, false);
mSpaceView = mTransparentHeaderView.findViewById(R.id.space);
/* ArrayList<String> testData = new ArrayList<String>(100);
for (int i = 0; i < 100; i++) {
testData.add("Item " + i);
}*/
//mListView.addHeaderView(mTransparentHeaderView);
/*mListView.setAdapter(new ArrayAdapter<String>(this, R.layout.simple_list_item, testData));
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mSlidingUpPanelLayout.collapsePane();
}
});
collapseMap();*/
mMapFragment = MapFragment.newInstance();
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.add(R.id.mapContainer, mMapFragment, "map");
fragmentTransaction.commit();
setUpMapIfNeeded();
}