本文整理汇总了Java中android.widget.SlidingDrawer类的典型用法代码示例。如果您正苦于以下问题:Java SlidingDrawer类的具体用法?Java SlidingDrawer怎么用?Java SlidingDrawer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SlidingDrawer类属于android.widget包,在下文中一共展示了SlidingDrawer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSlidingDrawer
import android.widget.SlidingDrawer; //导入依赖的package包/类
/**
* Sets the status of a given SlidingDrawer. Examples are Solo.CLOSED and Solo.OPENED.
*
* @param slidingDrawer the {@link SlidingDrawer}
* @param status the status that the {@link SlidingDrawer} should be set to
*/
public void setSlidingDrawer(final SlidingDrawer slidingDrawer, final int status){
if(slidingDrawer != null){
Activity activity = activityUtils.getCurrentActivity(false);
if(activity != null){
activity.runOnUiThread(new Runnable()
{
public void run()
{
try{
switch (status) {
case CLOSED:
slidingDrawer.close();
break;
case OPENED:
slidingDrawer.open();
break;
}
}catch (Exception ignored){}
}
});
}
}
}
示例2: iniComponent
import android.widget.SlidingDrawer; //导入依赖的package包/类
private void iniComponent()
{
zoomableViewPager = (ImageViewTouchViewPager) findViewById(R.id.zoomableViewPager);
sdComments = (SlidingDrawer) findViewById(R.id.sdComments);
tvDesc = (TextView) findViewById(R.id.tvDesc);
tvAuthorAndDate = (TextView) findViewById(R.id.tvAuthorAndDate);
tvCommentNum = (TextView) findViewById(R.id.tvCommentNum);
lvComments = (PullToRefreshListViewWithFooter) findViewById(R.id.lvComments);
lvComments.setEmptyView(getEmptyView());
// etComment = (EditText) findViewById(R.id.etComment);
// ivSendComment = (ImageView) findViewById(R.id.ivSendComment);
mListViews = new ArrayList<View>();
photos = new ArrayList<Photo>();
photosAdapter = new ZoomablePagerAdapter();
zoomableViewPager.setAdapter(photosAdapter);
mInflater = getLayoutInflater();
comments = new ArrayList<Comments>();
commentsAdapter = new CommentsAdapter(this, comments);
lvComments.setAdapter(commentsAdapter);
}
示例3: onCreate
import android.widget.SlidingDrawer; //导入依赖的package包/类
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sliding_drawer);
slideButton = (Button) findViewById(R.id.slideButton);
slidingDrawer = (SlidingDrawer) findViewById(R.id.SlidingDrawer);
b1 = (Button) findViewById(R.id.Button01);
b2 = (Button) findViewById(R.id.Button02);
b3 = (Button) findViewById(R.id.Button03);
b1.setOnClickListener(this);
b2.setOnClickListener(this);
b3.setOnClickListener(this);
slidingDrawer.setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener() {
@Override
public void onDrawerOpened() {
slideButton.setText("V");
}
});
slidingDrawer.setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener() {
@Override
public void onDrawerClosed() {
slideButton.setText("^");
}
});
}
示例4: onCreate
import android.widget.SlidingDrawer; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
widgets = new ArrayList<>();
apps = new ArrayList<>();
appShortcuts = new ArrayList<>();
widgetShortcuts = new ArrayList<>();
iconFiles = new ArrayList<>();
drawerGrid = (GridView) findViewById(R.id.content);
slidingDrawer = (SlidingDrawer) findViewById(R.id.drawer);
homeView = (RelativeLayout) findViewById(R.id.home_view);
panelIndicator = (TextView) findViewById(R.id.panelIndicator);
getWidgetIDs();
getPackages();
drawerAdapterObject = new DrawerAdapter(this, apps);
drawerGrid.setAdapter(drawerAdapterObject);
vibration = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
mAppWidgetManager = AppWidgetManager.getInstance(this);
mAppWidgetHost = new LauncherAppWidgetHost(this, R.id.APPWIDGET_HOST_ID);
dir = getFilesDir();
setSwipeDetector();
initTrashIcons();
setDrawerListeners();
setReceiver();
setTabs();
cleanStorage();
loadPage(1);
}
示例5: setSlidingListeners
import android.widget.SlidingDrawer; //导入依赖的package包/类
public void setSlidingListeners(){
final Button appTab = (Button) findViewById(R.id.apps);
final Button widgetTab = (Button) findViewById(R.id.widgets);
slidingDrawer.setOnDrawerScrollListener(new SlidingDrawer.OnDrawerScrollListener() {
@Override
public void onScrollStarted() {
//disableTabs(apps, widgets);
}
@Override
public void onScrollEnded() {
if(slidingDrawer.isOpened() && (!(slidingDrawer.isMoving()) || slidingDrawer.isEnabled())){
enableTabs(appTab, widgetTab);
}
}
});
slidingDrawer.setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener() {
@Override
public void onDrawerOpened() {
enableTabs(appTab, widgetTab);
}
});
slidingDrawer.setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener() {
@Override
public void onDrawerClosed() {
disableTabs(appTab, widgetTab);
}
});
}
示例6: type
import android.widget.SlidingDrawer; //导入依赖的package包/类
public static SubjectFactory<SlidingDrawerSubject, SlidingDrawer> type() {
return new SubjectFactory<SlidingDrawerSubject, SlidingDrawer>() {
@Override
public SlidingDrawerSubject getSubject(FailureStrategy fs, SlidingDrawer that) {
return new SlidingDrawerSubject(fs, that);
}
};
}
示例7: setSlidingDrawer
import android.widget.SlidingDrawer; //导入依赖的package包/类
/**
* Sets the status of a SlidingDrawer matching the specified index. Examples of status are: {@code Solo.CLOSED} and {@code Solo.OPENED}.
*
* @param index the index of the {@link SlidingDrawer}
* @param status the status to set the {@link SlidingDrawer}
*/
public void setSlidingDrawer(int index, int status){
if(config.commandLogging){
Log.d(config.commandLoggingTag, "setSlidingDrawer("+index+", "+status+")");
}
setSlidingDrawer(waiter.waitForAndGetView(index, SlidingDrawer.class), status);
}
示例8: onCreateView
import android.widget.SlidingDrawer; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.fragment_right, null);
mListView = (PullToZoomListView) view.findViewById(R.id.ptzlv_list);
mSlidingDrawer = (SlidingDrawer) view.findViewById(R.id.sliding_drawer);
mBtnNotification = (Button) view.findViewById(R.id.btn_notification);
return view;
}
示例9: onCreate
import android.widget.SlidingDrawer; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Preferences.init(this, Tomdroid.CLEAR_PREFERENCES);
setContentView(R.layout.note_edit);
content = (EditText) findViewById(R.id.content);
title = (EditText) findViewById(R.id.title);
formatBar = (SlidingDrawer) findViewById(R.id.formatBar);
content.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
if(hasFocus && !xmlOn) {
formatBar.setVisibility(View.VISIBLE);
}
else {
formatBar.setVisibility(View.GONE);
}
}
});
neverSaved = getIntent().getBooleanExtra(Tomdroid.IS_NEW_NOTE_EXTRA, false);
uri = getIntent().getData();
}
示例10: WrappingSlidingDrawer
import android.widget.SlidingDrawer; //导入依赖的package包/类
public WrappingSlidingDrawer(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
int orientation = attrs
.getAttributeIntValue("android", "orientation", ORIENTATION_VERTICAL);
mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}
示例11: WrappingSlidingDrawer
import android.widget.SlidingDrawer; //导入依赖的package包/类
public WrappingSlidingDrawer(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
int orientation = attrs.getAttributeIntValue("android", "orientation",
ORIENTATION_VERTICAL);
mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}
示例12: WrappingSlidingDrawer
import android.widget.SlidingDrawer; //导入依赖的package包/类
public WrappingSlidingDrawer(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
int orientation = attrs.getAttributeIntValue("android", "orientation", ORIENTATION_VERTICAL);
mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}
示例13: onCreate
import android.widget.SlidingDrawer; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sliding);
Button handle0 = (Button) findViewById(R.id.handle0);
Button button1 = (Button) findViewById(R.id.button1);
Button button2 = (Button) findViewById(R.id.button2);
Button button3 = (Button) findViewById(R.id.button3);
Button button4 = (Button) findViewById(R.id.button4);
CheckBox checkbox = (CheckBox) findViewById(R.id.cb_slidable);
sd = (SlidingDrawer) findViewById(R.id.d_sliding);
sd.setOnDrawerOpenListener(this);
}
示例14: SlidingDrawerSubject
import android.widget.SlidingDrawer; //导入依赖的package包/类
protected SlidingDrawerSubject(FailureStrategy failureStrategy, SlidingDrawer subject) {
super(failureStrategy, subject);
}
示例15: initInCallScreen
import android.widget.SlidingDrawer; //导入依赖的package包/类
public void initInCallScreen() {
mInCallPanel = (ViewGroup) findViewById(R.id.inCallPanel);
mMainFrame = (ViewGroup) findViewById(R.id.mainFrame);
// 动态载入界面,此处就已经实例化了CallCard
View callCardLayout = getLayoutInflater().inflate(
R.layout.call_card_popup, mInCallPanel);
mCallCard = (CallCard) callCardLayout.findViewById(R.id.callCard);
mCallCard.reset();
mSlidingCardManager = new SlidingCardManager();
mSlidingCardManager.init(ccPhone, this, mMainFrame);
SlidingCardManager.WindowAttachNotifierView wanv = new SlidingCardManager.WindowAttachNotifierView(
this);
wanv.setSlidingCardManager(mSlidingCardManager);
wanv.setVisibility(View.GONE);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(0, 0);
mMainFrame.addView(wanv, lp);
mStats = (TextView) findViewById(R.id.stats);
mCodec = (TextView) findViewById(R.id.codec);
mDialerDrawer = (SlidingDrawer) findViewById(R.id.dialer_container);
mCallCard.displayOnHoldCallStatus(ccPhone, null);
mCallCard.displayOngoingCallStatus(ccPhone, null);
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)
mCallCard.updateForLandscapeMode();
// Have the WindowManager filter out touch events that are "too fat".
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES);
mDigits = (EditText) findViewById(R.id.digits);
mDisplayMap.put(R.id.one, '1');
mDisplayMap.put(R.id.two, '2');
mDisplayMap.put(R.id.three, '3');
mDisplayMap.put(R.id.four, '4');
mDisplayMap.put(R.id.five, '5');
mDisplayMap.put(R.id.six, '6');
mDisplayMap.put(R.id.seven, '7');
mDisplayMap.put(R.id.eight, '8');
mDisplayMap.put(R.id.nine, '9');
mDisplayMap.put(R.id.zero, '0');
mDisplayMap.put(R.id.pound, '#');
mDisplayMap.put(R.id.star, '*');
mToneMap.put('1', ToneGenerator.TONE_DTMF_1);
mToneMap.put('2', ToneGenerator.TONE_DTMF_2);
mToneMap.put('3', ToneGenerator.TONE_DTMF_3);
mToneMap.put('4', ToneGenerator.TONE_DTMF_4);
mToneMap.put('5', ToneGenerator.TONE_DTMF_5);
mToneMap.put('6', ToneGenerator.TONE_DTMF_6);
mToneMap.put('7', ToneGenerator.TONE_DTMF_7);
mToneMap.put('8', ToneGenerator.TONE_DTMF_8);
mToneMap.put('9', ToneGenerator.TONE_DTMF_9);
mToneMap.put('0', ToneGenerator.TONE_DTMF_0);
mToneMap.put('#', ToneGenerator.TONE_DTMF_P);
mToneMap.put('*', ToneGenerator.TONE_DTMF_S);
View button;
for (int viewId : mDisplayMap.keySet()) {
button = findViewById(viewId);
button.setOnClickListener(this);
}
}