Skip to content

Commit

Permalink
Merge pull request #9 from Glennmen/master
Browse files Browse the repository at this point in the history
thank you
  • Loading branch information
caikaidev authored Sep 14, 2017
2 parents 4849cc4 + 6a5e56b commit fce3b6f
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 89 deletions.
8 changes: 4 additions & 4 deletions lib/src/main/res/layout/activity_update.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"></FrameLayout>
android:layout_height="wrap_content" />
</FrameLayout>
33 changes: 17 additions & 16 deletions lib/src/main/res/layout/fragment_download.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context="com.kcode.lib.dialog.UpdateActivity">

<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_update_lib_dialog_bg"
android:orientation="vertical"
android:padding="12dp"
tools:context="com.kcode.lib.dialog.UpdateActivity">
android:orientation="vertical">

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="12dp"
android:elevation="3dp"
android:gravity="center|left"
android:text="@string/update_lib_file_download_text"
android:textColor="#525252"
android:textSize="18sp"/>
android:textSize="18sp" />

<ProgressBar
android:id="@+id/progressBar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>
android:layout_margin="12dp" />

<LinearLayout
android:id="@+id/downLayout"
Expand All @@ -40,22 +40,23 @@
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:background="@drawable/selector_update_lib_download_dialog_button"
android:layout_margin="12dp"
android:background="@drawable/selector_update_lib_button"
android:padding="6dp"
android:text="@string/update_lib_stop_download"
style="?android:attr/borderlessButtonStyle"
android:textColor="#4a4a4a"
android:textSize="16sp"/>
android:textSize="16sp" />

<Button
android:id="@+id/btnBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/selector_update_lib_download_dialog_button"
style="?android:attr/borderlessButtonStyle"
android:layout_margin="12dp"
android:background="@drawable/selector_update_lib_button"
android:padding="6dp"
android:text="@string/update_lib_background_download"
android:textColor="#4a4a4a"
android:textSize="16sp"/>
android:textSize="16sp" />

</LinearLayout>
</LinearLayout>
Expand Down
103 changes: 52 additions & 51 deletions lib/src/main/res/layout/fragment_update.xml
Original file line number Diff line number Diff line change
@@ -1,67 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context="com.kcode.lib.dialog.UpdateActivity">

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_update_lib_dialog_bg"
android:orientation="vertical"
tools:context="com.kcode.lib.dialog.UpdateActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/shape_update_lib_dialog_title_bg"
android:elevation="3dp"
android:gravity="center"
android:text="@string/update_lib_dialog_title"
android:textColor="#525252"
android:textSize="20sp"/>

<TextView
android:id="@+id/tvContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:minLines="10"
android:textColor="#4a4a4a"
android:textSize="16sp"/>
android:background="@drawable/shape_update_lib_dialog_bg">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="8dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingStart="12dp"
android:paddingTop="12dp">
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/shape_update_lib_dialog_title_bg"
android:elevation="3dp"
android:gravity="center"
android:text="@string/update_lib_dialog_title"
android:textColor="#525252"
android:textSize="20sp" />

<Button
android:id="@+id/btnCancel"
android:layout_width="0dp"
<TextView
android:id="@+id/tvContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="@drawable/selector_update_lib_button"
android:text="@string/update_lib_cancel"
android:layout_margin="12dp"
android:minLines="10"
android:textColor="#4a4a4a"
android:textSize="18sp"/>
android:textSize="16sp" />

<Button
android:id="@+id/btnUpdate"
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="@drawable/selector_update_lib_button"
android:text="@string/update_lib_update"
android:textColor="#4a4a4a"
android:textSize="18sp"/>
android:orientation="horizontal">

<Button
android:id="@+id/btnCancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:layout_weight="1"
android:background="@drawable/selector_update_lib_button"
android:text="@string/update_lib_cancel"
android:textColor="#4a4a4a"
android:textSize="18sp" />

<Button
android:id="@+id/btnUpdate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:layout_weight="1"
android:background="@drawable/selector_update_lib_button"
android:text="@string/update_lib_update"
android:textColor="#4a4a4a"
android:textSize="18sp" />

</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>
28 changes: 28 additions & 0 deletions lib/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="update_lib_network_not_available">Het huidige netwerk is niet beschikbaar</string>
<string name="update_lib_default_toast">Is momenteel de nieuwste versie</string>

<!--DownLoadDialog-->
<string name="update_lib_download_cancel">Download geannuleerd</string>
<string name="update_lib_download_in_background">Bijwerken op de achtergrond</string>
<string name="update_lib_download_finish">Download is compleet</string>
<string name="update_lib_download_failed">Download mislukt</string>
<string name="update_lib_file_download_format">Downloaden(%1$s/%2$s)</string>

<!--UpdateDialog-->
<string name="update_lib_update_content">Release notities&#65306;</string>
<string name="update_lib_version_code">Versienummer&#65306;</string>
<string name="update_lib_update">Update</string>
<string name="update_lib_cancel">Annuleren</string>
<string name="update_lib_dialog_title">Update Beschikbaar</string>

<!--DownLoadService-->
<string name="update_lib_file_download">Bestand downloaden</string>
<string name="update_lib_file_downloading">Wordt gedownload&#8230;</string>

<!--fragment_download.xml-->
<string name="update_lib_file_download_text">Downloaden</string>
<string name="update_lib_stop_download">Stop met downloaden</string>
<string name="update_lib_background_download">Achtergrond download</string>
</resources>
28 changes: 28 additions & 0 deletions lib/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="update_lib_network_not_available">当前网络不可用</string>
<string name="update_lib_default_toast">当前已是最新版本</string>

<!--DownLoadDialog-->
<string name="update_lib_download_cancel">已取消更新</string>
<string name="update_lib_download_in_background">正在后台进行更新</string>
<string name="update_lib_download_finish">下载完成</string>
<string name="update_lib_download_failed">下载失败</string>
<string name="update_lib_file_download_format">正在下载(%1$s/%2$s)</string>

<!--UpdateDialog-->
<string name="update_lib_update_content">更新内容&#65306;</string>
<string name="update_lib_version_code">版本号&#65306;</string>
<string name="update_lib_update">升级</string>
<string name="update_lib_cancel">取消</string>
<string name="update_lib_dialog_title">更新提示</string>

<!--DownLoadService-->
<string name="update_lib_file_download">文件下载</string>
<string name="update_lib_file_downloading">正在下载中&#8230;</string>

<!--fragment_download.xml-->
<string name="update_lib_file_download_text">正在下载</string>
<string name="update_lib_stop_download">停止下载</string>
<string name="update_lib_background_download">后台下载</string>
</resources>
36 changes: 18 additions & 18 deletions lib/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="update_lib_network_not_available">当前网络不可用</string>
<string name="update_lib_default_toast">当前已是最新版本</string>
<string name="update_lib_network_not_available">The current network is not available</string>
<string name="update_lib_default_toast">Is currently the latest version</string>

<!--DownLoadDialog-->
<string name="update_lib_download_cancel">已取消更新</string>
<string name="update_lib_download_in_background">正在后台进行更新</string>
<string name="update_lib_download_finish">下载完成</string>
<string name="update_lib_download_failed">下载失败</string>
<string name="update_lib_file_download_format">正在下载(%1$s/%2$s)</string>
<string name="update_lib_download_cancel">Download canceled</string>
<string name="update_lib_download_in_background">Is updating in the background</string>
<string name="update_lib_download_finish">Download completed</string>
<string name="update_lib_download_failed">Download failed</string>
<string name="update_lib_file_download_format">Downloading(%1$s/%2$s)</string>

<!--UpdateDialog-->
<string name="update_lib_update_content">更新内容:</string>
<string name="update_lib_version_code">版本号:</string>
<string name="update_lib_update">升级</string>
<string name="update_lib_cancel">取消</string>
<string name="update_lib_dialog_title">更新提示</string>
<string name="update_lib_update_content">Release notes&#65306;</string>
<string name="update_lib_version_code">Version number&#65306;</string>
<string name="update_lib_update">Update</string>
<string name="update_lib_cancel">Cancel</string>
<string name="update_lib_dialog_title">Update Available</string>

<!--DownLoadService-->
<string name="update_lib_file_download">文件下载</string>
<string name="update_lib_file_downloading">正在下载中...</string>
<string name="update_lib_file_download">Download document</string>
<string name="update_lib_file_downloading">Is being downloaded&#8230;</string>

<!--fragment_download.xml-->
<string name="update_lib_file_download_text">正在下载</string>
<string name="update_lib_stop_download">停止下载</string>
<string name="update_lib_background_download">后台下载</string>

<string name="update_lib_file_download_text">Downloading</string>
<string name="update_lib_stop_download">Stop downloading</string>
<string name="update_lib_background_download">Background download</string>
</resources>

0 comments on commit fce3b6f

Please sign in to comment.