new widget - Panel

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Postby rcpinheiro » Mon Apr 12, 2010 12:54 pm

Thanks for the great work, pskink!

There is a small bug: click on the bottom (elastic interpolator). After opening the drawer, it switch doesn't always switch to down (to close the drawer). This bug doesn't appear always, it seems it's time-related.

A small integration manual for noobs would be great :D :D
rcpinheiro
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri Apr 02, 2010 6:45 pm

Top

Postby pskink » Mon Apr 12, 2010 1:14 pm

rcpinheiro wrote:Thanks for the great work, pskink!

There is a small bug: click on the bottom (elastic interpolator). After opening the drawer, it switch doesn't always switch to down (to close the drawer). This bug doesn't appear always, it seems it's time-related.

A small integration manual for noobs would be great :D :D


screenshot?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby rcpinheiro » Mon Apr 12, 2010 2:48 pm

pskink wrote:screenshot?


Image

Found the problem, the switcher only changes from up to down some time after the end of the animation.
Don't know if it's a feature or a (small) bug :-)
rcpinheiro
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri Apr 02, 2010 6:45 pm

Postby rcpinheiro » Thu Apr 15, 2010 11:20 pm

Suggestion for improvements:
1) define the transparency for the Panel. 100% opacity is so old ;-)
2) flag to blur contents behind Panel (great for important drawers)

Thanks again for the great job!
rcpinheiro
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri Apr 02, 2010 6:45 pm

Re: new widget - Panel

Postby puxdroid » Wed Nov 10, 2010 12:40 pm

Hi!

I have seen the project (good gob!!) and I would like to use your code, can you explain me how to do that?

Thank you!
puxdroid
Developer
Developer
 
Posts: 49
Joined: Wed Nov 25, 2009 11:57 am

Re: new widget - Panel

Postby powerje » Fri Dec 10, 2010 10:35 pm

How does one use this now that styleable has been deprecated?

Thanks!

edit:

Nevermind, I'm an idiot - need to check out the attrs under values in the resources and that fixed the styleable problems I was having.

However I do have a new issue, I can't get the panel to stay on top of the grid view that I am attempting to place below it. When opening the Panel the grid view (or TextView as I tried to use thinking it might be a GridView problem) stays in the foreground and the Panel is behind it. Am I missing some simple way to fix this?

edit 2:
Okay so what I ended up doing was adding a relative layout inside my frame layout, seems kind of counter intuitive though, is this the proper way to use Panel?
powerje
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Oct 09, 2010 1:46 pm

Top

Re: new widget - Panel

Postby puxdroid » Thu Jan 20, 2011 7:42 pm

Hi!

I'm trying to use this code, but I have some problems... When I copy paste the code to my project, the XML layout file, report me the following error:

Multiple annotations found at this line:
- error: No resource identifier found for attribute 'animationDuration' in package
'com.test.org.panel'
- error: No resource identifier found for attribute 'linearFlying' in package 'com.test.org.panel'
- error: No resource identifier found for attribute 'closedHandle' in package 'com.test.org.panel'
- error: No resource identifier found for attribute 'openedHandle' in package 'com.test.org.panel'
- error: No resource identifier found for attribute 'position' in package 'com.test.org.panel'


Can you help me??

Thank you!
puxdroid
Developer
Developer
 
Posts: 49
Joined: Wed Nov 25, 2009 11:57 am

Re: new widget - Panel

Postby sbindra » Sat Oct 08, 2011 8:28 pm

Hi,
Trying to use this code, with listview as content, but the handle is totally hidden once it opens. Here is the layout file.xml

<org.miscwidgets.widget.Panel
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:id="@+id/historyPanel"
android:layout_weight="1"
android:layout_gravity="left"
panel:handle="@+id/panelHandle"
panel:content="@+id/panelContent"
panel:position="left"
panel:openedHandle="@drawable/left_switcher_expanded_background"
panel:closedHandle="@drawable/left_switcher_collapsed_background"
>
<Button
android:id="@+id/panelHandle"
android:layout_width="33dip"
android:layout_height="fill_parent"
/>
<LinearLayout
android:id="@+id/panelContent"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="fill_parent">

<TextView
android:id="@+id/panelContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dip"
android:text="This is\nmy second\nleft Panel"
android:textSize="16dip"
android:textColor="#eee"
android:textStyle="bold"
android:background="#115544"
/>

<ListView
android:id="@+id/search_history_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>

</org.miscwidgets.widget.Panel>

Can you pl help me?
Thanks,
sbindra
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Oct 08, 2011 8:22 pm

Re: new widget - Panel

Postby sadath42 » Tue Feb 07, 2012 7:04 am

Hi,
While draging i want the view to be paused and then again on click it should display
the view.
if (!mGestureDetector.onTouchEvent(event)) {
if (action == MotionEvent.ACTION_UP) {

// tup up after scrolling


// post(startAnimation);

}
I had commented this so that view pauses but its not taking click or slide again
its can u pls help me
sadath42
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Feb 07, 2012 6:56 am

Re: new widget - Panel

Postby soma-web » Mon Mar 12, 2012 6:47 pm

Hi, great tut. THANK YOU!!!!
I have really problems to check out your code. Could you please send me a copy to my e-mail soma-web [a] web . de

Thanks!
soma-web
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Mar 12, 2012 6:46 pm

Re: new widget - Panel

Postby magiclands » Fri May 11, 2012 12:27 pm

Hi,

i want to use the sliding drawer, but encountered a problem. If i want to slide out from left 2right and set the panel:weight to any percent value, the handle will be hidden if the content is full out. This works for a panel sliding out from right2left.

May be someone encountered the same problem and found a solution
magiclands
Once Poster
Once Poster
 
Posts: 1
Joined: Fri May 11, 2012 12:00 pm

Re: new widget - Panel

Postby emmets » Mon Sep 17, 2012 9:11 am

终于找到了,非常感谢你能够分享~~ :D

这个网址:http://code.google.com/p/android-misc-widgets/,什么都没有?
emmets
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Sep 17, 2012 8:51 am

Re: new widget - Panel

Postby kolipass » Wed Sep 19, 2012 1:06 pm

Hello. help please. I want to create at run this panel;
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. XmlPullParser parser = getResources().getXml(R.xml.panel_attribute);
  2.   AttributeSet attributes = Xml.asAttributeSet(parser);
  3.   Panel panel = (Panel) new Panel(getActivity(),attributes);
  4.   panel.setInterpolator(new BounceInterpolator(Type.OUT));
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

what should be the panel_attribute.xml ?


I want to look like this:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <org.miscwidgets.widget.Panel
  2.        android:id="@+id/topPanel"
  3.        android:layout_width="fill_parent"
  4.        android:layout_height="wrap_content"
  5.        android:paddingBottom="4dip"
  6.        panel:animationDuration="1000"
  7.        panel:closedHandle="@drawable/sliding_drawer_handle_minimized"
  8.        panel:content="@+id/searchparams_layout"
  9.        panel:handle="@+id/handle"
  10.        panel:linearFlying="true"
  11.        panel:openedHandle="@drawable/sliding_drawer_handle_minimized"
  12.        panel:position="top" />
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
kolipass
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Sep 19, 2012 12:55 pm

Top
Previous

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests