我想要一个像这样的标签的例子
我搜索了但是得到了这个.
我无法使用此来源.有人能告诉我另一个带滑动选项的标签示例.
我认为viewpageindicator与google play标签不同.
因为当我在谷歌播放页面滚动时,标签下方的行在滚动时移动,但在viewpageindicator中它不是.
谢谢
我需要在屏幕右侧滑出div标签,如何使用jQuery获得此效果?我一直在这里看:http://api.jquery.com/category/effects/sliding/它似乎不是我正在寻找的......
是否有可能实现垂直旋转木马滑动与Twitter Bootstrap?在bootstrap.js中我找到了这个
, slide: function (type, next) {
var $active = this.$element.find('.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
Run Code Online (Sandbox Code Playgroud)
我试图将方向改为"向上"和"向下",但滑动不起作用.
我想创建一个Fragment
带有RecyclerView
滑动的项目,并在向上滑动时显示更多项目.
这是我正在谈论的一个例子.
初始创作:
用户向上滑动RecyclerView
向上滑动,显示更多项目:
有几个问题,我想不使用一个CoordinatorLayout
,我想把它设置到RecyclerView
堆叠中的项目直接在上面EditText
.
这是我使用的布局代码:
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="@android:color/transparent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsingToolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<View
android:id="@+id/emptyView"
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="@android:color/transparent"
app:layout_collapseMode="parallax"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="@+id/editText"
android:paddingLeft="16dp"
android:inputType="textAutoCorrect"
android:layout_centerVertical="true"
android:background="@android:color/transparent"
android:layout_width="match_parent"
android:layout_height="56dp"/>
</RelativeLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我得到这样的东西:
这绝对不可扩展,需要持续测量空视图.
我正在尝试优雅地实现一种方法来动画(平移,淡化)控件(可能同时多于一个).例如,假设我左上角有一张图片,右下角有一个文本框,我希望能够让它们平滑地滑过窗口并切换位置.我已经工作了一段时间,但没有想出任何能够顺利或轻松实现这一目标的东西.
在Clojure中,在(有限的,不是太大的)seq上设置滑动窗口最好的方法是什么?我应该只使用drop
并take
跟踪当前的指数,还是有一种我错过的更好的方式?
是否有Delphi的滑动(动画)面板组件?
例如,它可以在Raize Components中找到(左侧面板带有"Hot Spot"或hide/show按钮).
我不需要一个可调整大小的面板,而是一个可以从左到右水平平滑滑动的面板+有一个隐藏/显示按钮(如果没有那个按钮,这不是什么大问题).
谢谢!
我尝试了本教程并且效果很好,但现在我想知道在打开应用程序时是否可以直接转到特定选项卡而不是默认情况下的第一个选项卡(左侧)?
例如:我希望应用程序直接在"事件"选项卡上打开:
我搜索了代码,但没有发现任何相关内容.
谢谢大家
编辑:
这是方法:只需添加pager.setCurrentItem(1);
您的MainActivity(标签容器).
我在屏幕左侧有一个隐藏的面板,当屏幕左侧的"标签"点击时,它会滑入视图.我需要面板滑过现有页面内容的顶部,我需要选项卡随之移动.所以两者都绝对定位于CSS.一切都很好,除了我需要标签(以及标签容器)在面板显示时向左移动,所以它似乎粘在面板的右侧.使用浮动时它相对简单,但当然这会影响现有内容的布局,因此绝对定位.我已经尝试动画了面板容器的左侧位置(请参阅记录的jquery函数),但我无法使其工作.
这是我已更改的原始代码的示例,如何让按钮/标签滑动?
http://www.iamkreative.co.uk/jquery/slideout_div.html
我的HTML
<div><!--sample page content-->
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
</p>
</div>
<div id="panel" class="height"> <!--the hidden panel -->
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</p>
</div>
</div>
<!--if javascript is disabled use this link-->
<div id="tab-container" class="height">
<a href="#" onclick="return()">
<div id="tab"><!-- this will activate the panel. --></div>
</a>
</div>
Run Code Online (Sandbox Code Playgroud)
我的jQuery
$(document).ready(function(){
$("#panel, .content").hide(); //hides …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用jeremy feinstein的SlidingMenu库开发一个应用程序,我发现它非常有趣.我已经设置了所有内容并创建了一个示例项目,以检查我是否能够实现滑动菜单,但遗憾的是我在应用程序中看不到任何滑动菜单.
这就是我做的事情,
从HERE下载SlidinMenu 并作为android现有项目导入eclipse.改变了谷歌API级别.(现在没有红色标记了.)
创建了一个新项目,并向其添加了滑动菜单库.
正如jfeinstein解释的那样,我将以下代码添加到我的MainActivity.java中
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Title !");
setContentView(R.layout.activity_main);
SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setShadowWidthRes(R.dimen.shadow_width);
menu.setShadowDrawable(R.drawable.shadow);
menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
menu.setMenu(R.layout.menu);
}
Run Code Online (Sandbox Code Playgroud)
}
和我的activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<com.slidingmenu.lib.SlidingMenu
xmlns:sliding="http://schemas.android.com/apk/res-auto"
android:id="@+id/slidingmenulayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
sliding:viewAbove="@layout/testing"
sliding:viewBehind="@layout/testing_two"
sliding:touchModeAbove="margin"
sliding:behindWidth="@dimen/shadow_width"
sliding:behindScrollScale="0.5"
sliding:shadowDrawable="@drawable/shadow"
sliding:shadowWidth="@dimen/shadow_width"
sliding:fadeEnabled="true"
sliding:selectorEnabled="true"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
和menu_frame.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/menu_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Run Code Online (Sandbox Code Playgroud)
testing.xml
<?xml version="1.0" …
Run Code Online (Sandbox Code Playgroud)