Hello, I am sending you the code i used to set my Ui in case of draggable pannel. It is very nice library and i am stuck on just one part. Screenshot i have given in previous issue i posted. My list is getting visible from bottom, seems like fragment below youtube fragment is not behaving properly and this happens only when i click on list after minimizing youtube player(on dragging it down) . It maximizes well and even video plays good but it is destroying my UI at bottom(screen shot will give u clear view) . I am sending you my code as well
//On oncreate
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.vediofile);
flag = 0;
lv = (ListView) findViewById(R.id.iv_thumbnail);
draggablePanel = (DraggablePanel) findViewById(R.id.draggable_panel);
// ButterKnife.inject(this);
moviePosterFragment = new MoviePosterFragment();
initializeYoutubeFragment();
hookDraggablePanelListeners();
initializeDraggablePanel();
lv.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1,
int position, long arg3) {
// On click listener of list i am playing a new vedio
VIDEO_KEY = LoaderTask.vedio.get(position);
draggablePanel.maximize();
youtubePlayer.loadVideo(VIDEO_KEY);
}
});
This is how i initialize draggable pannel
private void initializeDraggablePanel() {
// Here i am loading my list first and creating adapter
FrameLayout footerLayout = (FrameLayout) getLayoutInflater().inflate(
R.layout.footer, null);
System.out.println("6666");
ProgressBar footer = (ProgressBar) footerLayout
.findViewById(R.id.progressbar);
lv.addFooterView(footerLayout);
// --page size = 10--
ProdAdapter ad = new ProdAdapter(getApplicationContext(), 15, footer,
"M", "car");
lv.setAdapter(ad);
check = true;
LoaderTask t = new LoaderTask(0, 15, getApplicationContext(), ad, "M",
"car", check);
t.execute();
// Here code is same as your demo project for putting top and bottom fragments
draggablePanel.setFragmentManager(getSupportFragmentManager());
draggablePanel.setTopFragment(youtubeFragment);
moviePosterFragment = new MoviePosterFragment();
// moviePosterFragment.setPoster(VIDEO_POSTER_THUMBNAIL);
moviePosterFragment.setPosterTitle(VIDEO_POSTER_TITLE);
draggablePanel.setBottomFragment(moviePosterFragment);
draggablePanel.initializeView();
}
//code of fragment i am setting at this method setbottomfragment
public class MoviePosterFragment extends Fragment {
xml of working for bottom fragment
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
this is my dimen.xml in values folder
<?xml version="1.0" encoding="utf-8"?>
```
200dip
```
10dip22
I tried to give you my code in brief please help me . Its been 4 days i am stuck on this
I am uploading vedio as well for you . have a look please
http://videobam.com/IUjYH
Hello, I am sending you the code i used to set my Ui in case of draggable pannel. It is very nice library and i am stuck on just one part. Screenshot i have given in previous issue i posted. My list is getting visible from bottom, seems like fragment below youtube fragment is not behaving properly and this happens only when i click on list after minimizing youtube player(on dragging it down) . It maximizes well and even video plays good but it is destroying my UI at bottom(screen shot will give u clear view) . I am sending you my code as well //On oncreate protected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.vediofile); flag = 0; lv = (ListView) findViewById(R.id.iv_thumbnail); draggablePanel = (DraggablePanel) findViewById(R.id.draggable_panel); // ButterKnife.inject(this); moviePosterFragment = new MoviePosterFragment(); initializeYoutubeFragment(); hookDraggablePanelListeners(); initializeDraggablePanel();
This is how i initialize draggable pannel private void initializeDraggablePanel() { // Here i am loading my list first and creating adapter FrameLayout footerLayout = (FrameLayout) getLayoutInflater().inflate( R.layout.footer, null); System.out.println("6666"); ProgressBar footer = (ProgressBar) footerLayout .findViewById(R.id.progressbar);
// Here code is same as your demo project for putting top and bottom fragments draggablePanel.setFragmentManager(getSupportFragmentManager()); draggablePanel.setTopFragment(youtubeFragment); moviePosterFragment = new MoviePosterFragment(); // moviePosterFragment.setPoster(VIDEO_POSTER_THUMBNAIL); moviePosterFragment.setPosterTitle(VIDEO_POSTER_TITLE); draggablePanel.setBottomFragment(moviePosterFragment); draggablePanel.initializeView();
//code of fragment i am setting at this method setbottomfragment public class MoviePosterFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.poster, container, false); thumbnailImageView = (ImageView) view.findViewById(R.id.iv_thumbnail2);
Now i am sending you xml i am using
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:draggable_panel="http://schemas.android.com/apk/res-auto" android:id="@+id/fl_container" android:layout_width="match_parent" android:layout_height="match_parent" >
xml of working for bottom fragment <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
<ImageView android:id="@+id/iv_thumbnail2" android:layout_width="match_parent" android:layout_height="match_parent"
this is my dimen.xml in values folder <?xml version="1.0" encoding="utf-8"?>
I tried to give you my code in brief please help me . Its been 4 days i am stuck on this I am uploading vedio as well for you . have a look please http://videobam.com/IUjYH