Skip to content
Snippets Groups Projects
Commit a3a49f1c authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Add a 'Home' button in subtitles picker

parent 6c659d58
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:layout_width="@dimen/file_picker_width"
android:layout_height="@dimen/file_picker_height">
<ImageView
android:id="@+id/button_home"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/directories"
android:onClick="onHomeClick"
tools:targetApi="11"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/icon"/>
<FrameLayout
android:id="@+id/fragment_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
\ No newline at end of file
</LinearLayout>
......@@ -26,6 +26,7 @@ package org.videolan.vlc.gui.browser;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import org.videolan.vlc.R;
......@@ -49,4 +50,9 @@ public class FilePickerActivity extends AppCompatActivity {
((FilePickerFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder)).browseUp();
}
}
public void onHomeClick(View v) {
((FilePickerFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder)).browseRoot();
setTitle(R.string.directories);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment