You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by saketkumar95 <gi...@git.apache.org> on 2018/02/28 14:26:55 UTC
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
GitHub user saketkumar95 opened a pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64
Improved LoginScreen UI
Please make sure these boxes are checked before submitting your pull request - thanks!
- [x] Apply the `AndroidStyle.xml` style template to your code in Android Studio.
- [x] Run the checks with `./gradlew check` to make sure you didn't break anything
- [x] If you have multiple commits please combine them into one commit by squashing them.
<img width="368" alt="screen shot 2018-02-28 at 7 38 08 pm" src="https://user-images.githubusercontent.com/21558765/36791900-fec439e8-1cbe-11e8-845e-54f9c08a84d5.png">
@sagar15795 Please review this. :)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/saketkumar95/incubator-taverna-mobile UI
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-taverna-mobile/pull/64.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #64
----
commit 0c768655edb9e1b44dca6cd7680ab8ddc8ecb9c4
Author: saketkumar95 <sa...@...>
Date: 2018-02-28T14:25:56Z
Improved LoginScreen UI
----
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171319318
--- Diff: app/src/main/java/org/apache/taverna/mobile/ui/login/LoginFragment.java ---
@@ -162,6 +167,20 @@ public void login(View v) {
}
}
+ @OnClick(R.id.bRegister)
+ public void register(View v) {
+ if (Build.VERSION.SDK_INT < 15) {
+ Intent i = new Intent(Intent.ACTION_VIEW);
+ i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ i.setData(Uri.parse(myExperimentURL));
+ startActivity(i);
+ } else {
+ CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
--- End diff --
use `customTabsIntentBuilder` in place of `builder`
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171318956
--- Diff: app/src/main/java/org/apache/taverna/mobile/ui/login/LoginFragment.java ---
@@ -162,6 +167,20 @@ public void login(View v) {
}
}
+ @OnClick(R.id.bRegister)
+ public void register(View v) {
+ if (Build.VERSION.SDK_INT < 15) {
+ Intent i = new Intent(Intent.ACTION_VIEW);
+ i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ i.setData(Uri.parse(myExperimentURL));
+ startActivity(i);
+ } else {
+ CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
+ CustomTabsIntent i = builder.build();
--- End diff --
use `customTabsIntent` in place of `i`
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171596749
--- Diff: app/src/main/res/layout/fragment_login.xml ---
@@ -42,42 +44,43 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
+ android:typeface="serif"
android:layout_centerHorizontal="true"
- android:layout_marginTop="42dp"
+ android:layout_marginTop="@dimen/textMargin_appName"
android:text="@string/app_name"
- android:textSize="25sp"/>
+ android:textSize="@dimen/text_size" />
<LinearLayout
android:id="@+id/loginlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tvAppName"
android:layout_centerInParent="true"
- android:layout_marginTop="20dp"
- android:background="@android:color/white"
+ android:layout_marginTop="@dimen/layout_login"
android:orientation="vertical"
- android:padding="20dp">
+ android:padding="@dimen/layout_login">
<TextView
android:id="@+id/tvLoginInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#E1E1E1"
--- End diff --
Move it to `color.xml`
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171311716
--- Diff: app/build.gradle ---
@@ -97,6 +97,7 @@ dependencies {
exclude module: 'xpp3'
}
+ implementation 'com.android.support:customtabs:25.0.0'
--- End diff --
use latest support library version and manage it using `$rootProject.supportLibraryVersion`
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-taverna-mobile/pull/64
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171313483
--- Diff: app/src/main/res/values/strings.xml ---
@@ -97,7 +97,8 @@ limitations under the License.
<string name="loading">Loading details</string>
<string name="loadworkflows">Loading Workflows</string>
<string name="fetchrun">Fetching run components</string>
- <string name="keeplogin">Remain Logged-in</string>
+ <string name="keeplogin">Remember me</string>
--- End diff --
`Remain Logged-in` is more intuitive than `Remember me`.
Please Revert this.
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171312884
--- Diff: app/src/main/res/layout/fragment_login.xml ---
@@ -42,10 +44,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
+ android:typeface="serif"
android:layout_centerHorizontal="true"
- android:layout_marginTop="42dp"
+ android:layout_marginTop="12dp"
--- End diff --
move all margin, padding and text size to `dimens.xml`.
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171318811
--- Diff: app/src/main/java/org/apache/taverna/mobile/ui/login/LoginFragment.java ---
@@ -162,6 +167,20 @@ public void login(View v) {
}
}
+ @OnClick(R.id.bRegister)
+ public void register(View v) {
+ if (Build.VERSION.SDK_INT < 15) {
+ Intent i = new Intent(Intent.ACTION_VIEW);
--- End diff --
use `intent` in place of `i`
---
[GitHub] incubator-taverna-mobile pull request #64: Improved LoginScreen UI
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/64#discussion_r171313974
--- Diff: app/src/main/res/layout/fragment_login.xml ---
@@ -110,17 +115,28 @@
android:checked="true"
android:text="@string/keeplogin"/>
- <Button
+ <android.support.v7.widget.AppCompatButton
android:id="@+id/bLogin"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
+ android:textColor="@color/white"
android:background="@color/colorPrimary"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="30dp"
android:contentDescription="@string/login_button_description"
- android:text="@string/bLogin"
- android:textSize="18sp"/>
+ android:text="@string/bLogin" />
+ <android.support.v7.widget.AppCompatButton
+ style="@style/Widget.AppCompat.Button.Borderless"
+ android:id="@+id/bRegister"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/create_an_account"
+ android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
--- End diff --
set text size smaller than login's text size.
---