horizontalscrollview

Horizontal scrollable ViewPager

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to create a horizontal scrollable ViewPager. My ViewPager contains Fragments. Each Fragment's width is larger than the screen so scrolling has to be enabled. I use following layout for my fragment item: <HorizontalScrollView android:id = "@+id/view_horizontal_scroll" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:isScrollContainer = "true" > <LinearLayout android:layout_width = "wrap_content" android:layout_height = "fill_parent" android:orientation = "horizontal" > <View android:layout

scrollTo, scrollBy, smoothScrollTo, smoothScrollTo don't work in ScrollView after adding view in child layout

[亡魂溺海] 提交于 2019-12-03 07:25:27
I have HorizontalScrollView with child Layout inside. After adding view into child layout I can't scroll HorizontalScrollView to the right side of scroller. scrollTo, scrollBy, smoothScrollTo, smoothScrollTo don't work. solved: LinearLayout ll = (LinearLayout) findViewById(R.id.ll); final HorizontalScrollView hsv = (HorizontalScrollView) findViewById(R.id.hsv); OnGlobalLayoutListener listener = new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { hsv.scrollTo(100, 0); } }; ll.getViewTreeObserver().addOnGlobalLayoutListener(listener); 来源: https://stackoverflow.com/questions

Android, make scrollable view overflow to the left instead of right?

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was recommended using a parent view to get horizontal scrolling right in my TextView: <HorizontalScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:scrollHorizontally="true" android:gravity="center|right" android:text="123456789"/> </HorizontalScrollView> Horizontal scrolling works fine but it makes the content overflow to the right when it gets longer than it's parent's width: ------- |123456|7 ------- However I'm

HorizontalScrollView with arrows

流过昼夜 提交于 2019-12-03 00:41:39
I'm trying to make a scrollable horizontal menu using HorizontalScrollView using the layout shown below. The menu is scrollable using the previous/next arrow buttons or on fling. When the HorizontalScrollView reach one end I'd like the arrow at the same end to be hidden (in the image shown below I'd like the left arrow to be hidden). How can I detect that the HorizontalScrollView has reached an end? Thanks <RelativeLayout android:background="@drawable/bg_home_menu" android:layout_width="fill_parent" android:layout_height="45dp"> <ImageView android:id="@+id/previous" android:src="@drawable

fingerpaint within a horizontalscrollview

夙愿已清 提交于 2019-12-02 22:00:10
问题 I am combining some pieces of code which I have found on stackoverflow and in the android development kit. I want to put the fingerpaint canvas within a lockable horizontalscrollview. However whenever I atempt to draw in a horizontal direction the scrollview scrolls rather than painting on the canvas. It did not have this problem when I had an imageview in the place of the custom view from fingerpaint. I think that perhaps the overriding of the onTouchEvent in both the custom

how to make horizontal scrolling menu in iOS

大兔子大兔子 提交于 2019-12-02 21:16:18
I would like to make a menu which will have horizontal scrolling. The menu contains total 16 categories. So I am planning to take 8 on first part and rest 8 on another part. Can some-one give me insight of what needs to be done? I believe I need to use below. UIScrollView Add buttons in this scrollview That's it? What I want is on first screen 8 buttons where first screen will have two rows with 4 buttons set on each row. Menu sample can be seen at http://www.shoutem.com/ If all you're doing is adding buttons to a horizontal scroll view you would do something like follows... - (void

HorizontalScrollView and Adapter

穿精又带淫゛_ 提交于 2019-12-02 14:05:08
问题 Can I use some adapter class with HorizontalScrollView class, similar as I use it with ListView? 回答1: If you are looking for a horizontal listview, there are many projects on github done by others. You can take a look at them. DevsmartLib-Android Android-Horizontal-ListView 来源: https://stackoverflow.com/questions/7763821/horizontalscrollview-and-adapter

Android 高仿 QQ5.0 侧滑菜单效果 自定义控件来袭

浪尽此生 提交于 2019-12-02 13:09:31
转载请标明出处: http://blog.csdn.net/lmj623565791/article/details/39257409 ,本文出自 【张鸿洋的博客】 上一篇博客带大家实现了: Android 自定义控件打造史上最简单的侧滑菜单 ,有兄弟看了以后说,你这滑动菜单过时了呀~QQ5.0的效果还不错~~嗯,的确,上一篇也承诺过,稍微修改上一篇的代码,实现QQ5.0侧滑菜单~~好了,下面就开始为大家展示写一个类QQ的侧滑有多easy ~! 1、原理分析 首先对比一下我们上篇的实现距离QQ的效果还有多远: 差距还是蛮大的 区别1、QQ的内容区域会伴随菜单的出现而缩小 区别2、QQ的侧滑菜单给人的感觉是隐藏在内容的后面,而不是拖出来的感觉 区别3、QQ的侧滑菜单有一个缩放以及透明度的效果~ 那么我们如何能做到呢: 对于区别1:这个好办,我们可以在滑动的时候,不断的改变内容区域的大小;如何改变呢?我们在菜单出现的整个过程中,不断记录菜单显示的宽度与其总宽度的比值,是个从0到1的过程,然后把0~1转化为1~0.7(假设内容区域缩小至0.7);不断去缩小内容区域; 对于区别3:也比较好办,上面已经可以得到0到1的这个值了,那么缩放和透明度的动画就不在话下了; 对于区别2:我们使用的HorizontalScrollView,然后水平放置了菜单和内容,如何让菜单可以隐藏到内容的后面呢

Freeze one table column horizontally

我的梦境 提交于 2019-12-02 11:04:58
问题 I have an activity in which I have implemented a tableview, the table view has a header and a body, the table is horizontally and vertically scrollable. This is the source code of the activity : public class ReportListActivity extends Activity { TableLayout report_table; TableRow tr_data; int j = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_report_list); report_table=(TableLayout) findViewById(R.id

Finding a replacement for FragmentStatePagerAdapter

∥☆過路亽.° 提交于 2019-12-02 10:23:59
问题 I want to find a replacement to the FragmentStatePagerAdapter + PagerFragment as we all know the FragmentStatePagerAdapter is still broken up to this day. There have been a bunch of attempts on github and by myself to make something that mimics the functionality of the FragmentStatePagerAdapter, except all of them seem to have extremely complicated logic with bugs that seem impossible to debug, e.g. https://gist.github.com/ypresto/8c13cb88a0973d071a64. The core functionality of my application