Fix layout get_videos.xml
This commit is contained in:
parent
64b8ea9e56
commit
a92f5a0f95
@ -4,33 +4,52 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<DatePicker
|
<LinearLayout
|
||||||
android:id="@+id/date_picker"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<TimePicker
|
|
||||||
android:id="@+id/time_picker"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/period"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/period"
|
android:orientation="horizontal">
|
||||||
android:inputType="number">
|
|
||||||
<requestFocus />
|
|
||||||
</EditText>
|
|
||||||
|
|
||||||
<EditText
|
<DatePicker
|
||||||
android:id="@+id/server_number"
|
android:id="@+id/date_picker"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:calendarViewShown="false" />
|
||||||
|
|
||||||
|
<TimePicker
|
||||||
|
android:id="@+id/time_picker"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/video_server"
|
android:orientation="horizontal">
|
||||||
android:inputType="number">
|
|
||||||
<requestFocus />
|
<EditText
|
||||||
</EditText>
|
android:id="@+id/period"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/period"
|
||||||
|
android:text="100"
|
||||||
|
android:inputType="number">
|
||||||
|
<requestFocus />
|
||||||
|
</EditText>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/server_number"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/video_server"
|
||||||
|
android:text="5"
|
||||||
|
android:inputType="number" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/get_videos"
|
android:id="@+id/get_videos"
|
||||||
|
@ -5,6 +5,7 @@ import android.app.Activity;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.format.DateFormat;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
@ -30,7 +31,11 @@ public final class VideoGetActivity extends Activity {
|
|||||||
|
|
||||||
datePicker = (DatePicker) findViewById(R.id.date_picker);
|
datePicker = (DatePicker) findViewById(R.id.date_picker);
|
||||||
timePicker = (TimePicker) findViewById(R.id.time_picker);
|
timePicker = (TimePicker) findViewById(R.id.time_picker);
|
||||||
timePicker.setIs24HourView(true);
|
final boolean is24h = DateFormat.is24HourFormat(this);
|
||||||
|
if (is24h) {
|
||||||
|
timePicker.setIs24HourView(is24h);
|
||||||
|
timePicker.setCurrentHour(Calendar.getInstance().get(Calendar.HOUR_OF_DAY));
|
||||||
|
}
|
||||||
periodEdit = (EditText) findViewById(R.id.period);
|
periodEdit = (EditText) findViewById(R.id.period);
|
||||||
serverNumberEdit = (EditText) findViewById(R.id.server_number);
|
serverNumberEdit = (EditText) findViewById(R.id.server_number);
|
||||||
resultList = (ListView) findViewById(R.id.result);
|
resultList = (ListView) findViewById(R.id.result);
|
||||||
|
Loading…
Reference in New Issue
Block a user