1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 11:02:35 +01:00

add downloads menu item

This commit is contained in:
Christian Schabesberger 2016-05-24 14:06:49 +02:00
parent 14aa6de422
commit 6f6c1704d4
5 changed files with 11 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
import org.schabi.newpipe.download.MainActivity;
import org.schabi.newpipe.extractor.ExtractionException;
import org.schabi.newpipe.extractor.SearchEngine;
import org.schabi.newpipe.extractor.ServiceList;
@ -366,6 +367,10 @@ public class VideoItemListActivity extends AppCompatActivity
"user_report", R.string.user_report));
return true;
}
case R.id.action_show_downloads: {
//todo: implement this
return true;
}
default:
return videoFragment.onOptionsItemSelected(item) ||
super.onOptionsItemSelected(item);

View File

@ -217,6 +217,7 @@ public class DownloadDialog extends DialogFragment {
String fName = name.getText().toString().trim();
// todo: add timeout? would be bad if the thread gets locked dueto this.
while (mBinder == null);
if(audio.isChecked()){

View File

@ -58,7 +58,6 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
private static final String TAG = MainActivity.class.toString();
private Menu menu = null;
private MissionsFragment mFragment;
private DownloadManager mManager;
@ -242,7 +241,6 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
this.menu = menu;
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.download_menu, menu);

View File

@ -11,6 +11,10 @@
app:showAsAction="never"
android:title="@string/settings"/>
<item android:id="@+id/action_show_downloads"
app:showAsAction="never"
android:title="@string/downloads" />
<item android:id="@+id/action_report_error"
app:showAsAction="never"
android:title="@string/report_error" />

View File

@ -79,6 +79,7 @@
<string name="show_age_restricted_content_title">Show age restricted content</string>
<string name="video_is_age_restricted">Video is Age restricted. Enable age restricted videos in the settings first.</string>
<string name="duration_live">live</string>
<string name="downloads">Downloads</string>
<!-- error strings -->
<string name="general_error">Error</string>