Skip to content

Commit

Permalink
parsing finally working
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasgiridhar committed Feb 10, 2016
1 parent 4cd82dc commit f1cfb7f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 45 deletions.
2 changes: 1 addition & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
<orderEntry type="library" exported="" name="google-http-client-1.19.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
<orderEntry type="library" exported="" name="google-http-client-jackson2-1.19.0" level="project" />
<orderEntry type="library" exported="" name="guava-jdk5-13.0" level="project" />
<orderEntry type="library" exported="" name="google-http-client-jackson2-1.19.0" level="project" />
<orderEntry type="library" exported="" name="youtubeExtractor" level="project" />
<orderEntry type="library" exported="" name="jsoup-1.8.1" level="project" />
</component>
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.apis:google-api-services-youtube:v3-rev120-1.19.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.daimajia.swipelayout:library:1.2.0@aar'
compile "com.daimajia.swipelayout:library:1.2.0@aar"
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.googlecode.mp4parser:isoparser:1.1.17'
compile 'org.aspectj:aspectjrt:1.8.8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public int getSwipeLayoutResourceId(int position){
return R.id.swipe;
}


@Override
public View generateView(final int position, ViewGroup parent){
View v = LayoutInflater.from(context).inflate(R.layout.listview_item,null);
Expand All @@ -53,38 +54,15 @@ public View generateView(final int position, ViewGroup parent){
swipe.addSwipeListener(new SimpleSwipeListener() {
@Override
public void onOpen(SwipeLayout layout) {
Toast.makeText(context, "Audio or video?", Toast.LENGTH_LONG).show();
String url = result.get(position).getURL();
Intent I = new Intent(context,DownloadActivity.class);
Intent I = new Intent(context, DownloadActivity.class);
Log.d("Starting", "onClick: Activity");
I.putExtra(Intent.EXTRA_TEXT,url);
I.putExtra(Intent.EXTRA_TEXT, url);
context.startActivity(I);

}
});

v.findViewById(R.id.Audio).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

song = new GetSong();
song.SetURL(result.get(position).getURL(), context);
song.execute();

}
});
v.findViewById(R.id.Video).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

//video = new GetVideo(result.get(position).getURL(),context);
String url = result.get(position).getURL();
Intent I = new Intent(context,DownloadActivity.class);
Log.d("Starting", "onClick: Activity");
I.putExtra(Intent.EXTRA_TEXT,url);
context.startActivity(I);
}
});
return v;
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/editText"/>
android:layout_below="@+id/editText"
android:scrollbars="none"/>

<TextView
android:id="@+id/empty"
Expand Down
23 changes: 6 additions & 17 deletions app/src/main/res/layout/listview_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,17 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="#FF5534"
android:background="#348fff"
android:gravity="center"
android:tag="Bottom3"
android:weightSum="10">

<Button
android:layout_width="150dp"
android:layout_height="fill_parent"
android:text="@string/Video"
android:id="@+id/Video"
android:textColor="#FF5534"
android:layout_gravity="end"
android:layout_weight="3.25" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Please wait."
/>

<Button
android:layout_width="150dp"
android:layout_height="fill_parent"
android:text="@string/Audio"
android:id="@+id/Audio"
android:textColor="#FF5534"
android:layout_gravity="end"
android:layout_weight="3.25" />

</LinearLayout>
<!-- Bottom View End-->
Expand Down

0 comments on commit f1cfb7f

Please sign in to comment.