Facebook-Notification like Pullable Screen - android

Can anybody point me to any public source where I can see how a pullable/draggable screen, like the one in the Facebook application for notifications, is implemented?
I have seen also this pattern in the application Öffi for DE/AT/CH/BE/UK.
Thanks for any help!

It's actually easier than you think - SlidingDrawer is part of the Android SDK. Just define the layouts to use for your drawer handle and your drawer content and you're done. From the docs:
<SlidingDrawer
android:id="#+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:handle="#+id/handle"
android:content="#+id/content">
<ImageView
android:id="#id/handle"
android:layout_width="88dip"
android:layout_height="44dip" />
<GridView
android:id="#id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</SlidingDrawer>

Related

How to disable Segmented control in Android?

Can any one please tell me, how to disable segmentedcontrol in android.
I have been using Foursquared library.
The link for library is given below.
You can do one thing for that.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<SegmentedButton
android:id="#+id/login_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false"
/>
<Layout
android:id="#+id/transperent_fragment"
android:name="com.test.transperentFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/body_texture"
android:alpha="0.2"
android:clickable="true"/>
</RelativeLayout>
Hope this helps you..:)

Menu that appears from the bottom on button click Android

I am learning Android these days, and I am having some trouble implementing something. When I click on the image icon, I want a menu to appear from below. The screenshot is as below. (Sorry it's in chinese....)
There's awesome library on github to get your task done.
All you need to do is setup your layout in two part as describe in below code
part 1: Your main activity(main frame)
part 2: bottom Panel which will be shown when user swipe/click on button.
You must check how to set "anchor point true" in library document.
<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="#+id/bottom_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoDragView="#+id/dragView"
sothree:umanoPanelHeight="68dp"
sothree:umanoParalaxOffset="10dp">
<FrameLayout
android:id="#+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<RelativeLayout
android:id="#+id/panel"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--This is bottom layout.-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00FF00"
android:orientation="vertical">
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#0000FF"
android:text="Button 1" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#0000FF"
android:text="Button 1" />
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#0000FF"
android:text="Button 1" />
</LinearLayout>
</RelativeLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
I think what you are trying to do here is to replicate the action sheet of iOS in android. There is this library which does exactly what you are looking for, https://github.com/baoyongzhang/android-ActionSheet . You can either have it as it as it is provided by author or you can clone it and suit your need accordingly. I would prefer if you could clone it as a module in your app that way you have limitless way to re-design it. If you need help on that let us know
You can simply follow the below link , it will implement what u need :
http://trickyandroid.com/fragments-translate-animation/
This will be done through Transition Fragment Animation .

Static fragment over ViewPager

I'm trying to develope a Walkthroughs that looks like skillpages app, but I don't know how to put a static fragment with buttons a ViewPager creating the filling of button flotating over the image, someone can help me please
Use http://developer.android.com/reference/android/widget/PopupWindow.html with transparent background.Position the popup window at the bottom of the screen.
Have a look at this code:https://github.com/chiragjain/Emoticons-Keyboard
It uses popupwindow to display emoticons keyboard.
Have you tried something like this?
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" >
<Button />
<Button />
</LinearLayout>
</FrameLayout>

Is there any way to set the navigation drawer as visible always

Is there any way to set the navigation drawer as visible always?.
So that the user knows that there is something on the right/left.
Like what you see in Hangouts app.
I know hangouts uses SlidePaneLayout, But anyone knows how to achieve this using Navigation Drawer?.
Got It!!.. Simplicity at its best. No libraries, No complicated codes. Use SimplePaneLayout.
Just set the android:layout_marginLeft to a suitable value. :) Awesome :)
<android.support.v4.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/slidingpanelayout">
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CCC"
android:orientation="horizontal"
android:id="#+id/fragment_firstpane"/>
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000"
android:orientation="horizontal"
android:layout_marginLeft="40dp"
android:id="#+id/fragment_secondpane"/>
</android.support.v4.widget.SlidingPaneLayout>

Can I have top sliding drawer in Android 2.1?

I simply want a sliding drawer from top in android which is applicable on Android 2.1. You can see an example of my need at this fiddle.
Is this possible using View Animations?
Note: The android misc widgets are useless to me, since they are far from usable in this case!
Why don't you just use a sliding drawer?
http://developer.android.com/reference/android/widget/SlidingDrawer.html
<SlidingDrawer
android:id="#+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:handle="#+id/handle"
android:content="#+id/content">
<ImageView
android:id="#id/handle"
android:layout_width="88dip"
android:layout_height="44dip" />
<GridView
android:id="#id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</SlidingDrawer>
Sliding Drawer Google Search

Categories

Resources