Created layout for directorychooser
This commit is contained in:
parent
f0f68fd015
commit
8726ea18c0
|
@ -221,6 +221,7 @@
|
|||
android:screenOrientation="landscape">
|
||||
</activity>
|
||||
<activity android:label="@string/playback_history_label" android:name=".activity.PlaybackHistoryActivity"></activity>
|
||||
<activity android:name=".activity.DirectoryChooserActivity" android:label="@string/choose_data_directory"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
style="@android:style/ButtonBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/butConfirm"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/confirm_label" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/butCancel"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/cancel_label" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/directory_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/butNavUp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/borderless_button"
|
||||
android:src="@attr/navigation_up" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvSelectedFolderLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_toRightOf="@id/butNavUp"
|
||||
android:text="@string/selected_folder_label"
|
||||
android:textStyle="bold" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvSelectedFolder"
|
||||
android:layout_below="@id/txtvSelectedFolderLabel"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_toRightOf="@id/butNavUp"
|
||||
android:ellipsize="middle" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/butNavUp"
|
||||
android:background="@color/bright_blue" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/directory_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_above="@id/footer"
|
||||
android:layout_below="@id/directory_info" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/new_folder_item" android:title="@string/new_folder_label" android:showAsAction="ifRoom|withText"></item>
|
||||
|
||||
|
||||
</menu>
|
|
@ -19,6 +19,7 @@
|
|||
<attr name="navigation_cancel" format="reference" />
|
||||
<attr name="navigation_expand" format="reference" />
|
||||
<attr name="navigation_refresh" format="reference" />
|
||||
<attr name="navigation_up" format="reference" />
|
||||
<attr name="social_share" format="reference" />
|
||||
<attr name="stat_playlist" format="reference" />
|
||||
<attr name="type_audio" format="reference" />
|
||||
|
|
|
@ -214,5 +214,10 @@
|
|||
<string name="best_rating_label">Best rating</string>
|
||||
<string name="add_feed_label">Add feed</string>
|
||||
<string name="miro_feed_added">Feed is being added</string>
|
||||
|
||||
|
||||
<!-- Directory chooser -->
|
||||
<string name="selected_folder_label">Selected folder:</string>
|
||||
<string name="new_folder_label">New folder</string>
|
||||
<string name="create_folder_label">Create folder</string>
|
||||
<string name="choose_data_directory">Choose data folder</string>
|
||||
</resources>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<item name="attr/navigation_cancel">@drawable/navigation_cancel</item>
|
||||
<item name="attr/navigation_expand">@drawable/navigation_expand</item>
|
||||
<item name="attr/navigation_refresh">@drawable/navigation_refresh</item>
|
||||
<item name="attr/navigation_up">@drawable/navigation_up</item>
|
||||
<item name="attr/social_share">@drawable/social_share</item>
|
||||
<item name="attr/stat_playlist">@drawable/stat_playlist</item>
|
||||
<item name="attr/type_audio">@drawable/type_audio</item>
|
||||
|
@ -28,7 +29,6 @@
|
|||
<item name="attr/non_transparent_background">@color/white</item>
|
||||
<item name="attr/borderless_button">@drawable/borderless_button</item>
|
||||
<item name="attr/video_overlay_background">@color/video_overlay_light</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AntennaPod.LightTabPageIndicator" parent="Widget.TabPageIndicator">
|
||||
|
@ -55,6 +55,7 @@
|
|||
<item name="attr/navigation_cancel">@drawable/navigation_cancel_dark</item>
|
||||
<item name="attr/navigation_expand">@drawable/navigation_expand_dark</item>
|
||||
<item name="attr/navigation_refresh">@drawable/navigation_refresh_dark</item>
|
||||
<item name="attr/navigation_up">@drawable/navigation_up_dark</item>
|
||||
<item name="attr/social_share">@drawable/social_share_dark</item>
|
||||
<item name="attr/stat_playlist">@drawable/stat_playlist_dark</item>
|
||||
<item name="attr/type_audio">@drawable/type_audio_dark</item>
|
||||
|
|
|
@ -1,16 +1,47 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
|
||||
import de.danoeh.antennapod.PodcastApp;
|
||||
import de.danoeh.antennapod.R;
|
||||
|
||||
/** Let's the user choose a directory on the storage device. */
|
||||
public abstract class DirectoryChooserActivity extends SherlockActivity {
|
||||
public class DirectoryChooserActivity extends SherlockActivity {
|
||||
private static final String TAG = "DirectoryChooserActivity";
|
||||
|
||||
private Button butConfirm;
|
||||
private Button butCancel;
|
||||
private Button butNavUp;
|
||||
private TextView txtvSelectedFolder;
|
||||
private ListView listDirectories;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(PodcastApp.getThemeResourceId());
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.directory_chooser);
|
||||
butConfirm = (Button) findViewById(R.id.butConfirm);
|
||||
butCancel = (Button) findViewById(R.id.butCancel);
|
||||
butNavUp = (Button) findViewById(R.id.butNavUp);
|
||||
txtvSelectedFolder = (TextView) findViewById(R.id.txtvSelectedFolder);
|
||||
listDirectories = (ListView) findViewById(R.id.directory_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = new MenuInflater(this);
|
||||
inflater.inflate(R.menu.directory_chooser, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue