Add an empty view when the track list is empty.

This commit is contained in:
Jimmy Shih
2012-04-12 16:48:59 -07:00
parent e3f13dd633
commit 00eee811f4
3 changed files with 43 additions and 4 deletions
+27 -4
View File
@@ -14,12 +14,35 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical" >
android:layout_width="fill_parent" >
<ListView
android:id="@+id/track_list"
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
</LinearLayout>
<LinearLayout
android:gravity="center"
android:id="@+id/track_list_empty"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="8dp" >
<TextView
android:gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingBottom="8dp"
android:text="@string/track_list_empty_message"
style="@android:style/TextAppearance.DeviceDefault.Large" >
</TextView>
<ImageButton
android:contentDescription="@string/menu_record_track"
android:id="@+id/track_list_record_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:padding="16dp"
android:src="@drawable/menu_record_track"
style="@android:style/Widget.DeviceDefault.ImageButton" />
</LinearLayout>
</FrameLayout>
+5
View File
@@ -2221,6 +2221,11 @@ limitations under the License.
the user that all tracks and markers will be permanently deleted from the phone.">
All tracks and markers will be permanently deleted from the phone.
</string>
<string name="track_list_empty_message"
translation_description="When the track list is empty, the message informing the user to click
on the record button to start a new recording">
You don\'t have any recorded tracks. Click on the record button to start a new recording.
</string>
<string name="track_list_record_error"
translation_description="When starting a new track recording, the error message informing the
user not able to record and asking the user to try again.">