mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
Use requestFocus tag to request initial focus.
This commit is contained in:
@@ -65,12 +65,6 @@ public class AuthorNameFragment extends SetupFragment {
|
|||||||
return TAG;
|
return TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
showSoftKeyboard(authorNameInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getHelpText() {
|
protected String getHelpText() {
|
||||||
return getString(R.string.setup_name_explanation);
|
return getString(R.string.setup_name_explanation);
|
||||||
|
|||||||
@@ -89,12 +89,6 @@ public class RssFeedImportActivity extends BriarActivity {
|
|||||||
progressBar = findViewById(R.id.progressBar);
|
progressBar = findViewById(R.id.progressBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
if (urlInput.requestFocus()) showSoftKeyboard(urlInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ public class WriteBlogPostActivity extends BriarActivity
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
notificationManager.blockNotification(groupId);
|
notificationManager.blockNotification(groupId);
|
||||||
if (input.requestFocus()) showSoftKeyboard(input);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -93,12 +93,6 @@ public class CreateForumActivity extends BriarActivity {
|
|||||||
progress = findViewById(R.id.createForumProgressBar);
|
progress = findViewById(R.id.createForumProgressBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
if (nameEntry.requestFocus()) showSoftKeyboard(nameEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void injectActivity(ActivityComponent component) {
|
public void injectActivity(ActivityComponent component) {
|
||||||
component.inject(this);
|
component.inject(this);
|
||||||
|
|||||||
@@ -85,10 +85,6 @@ public class ChangePasswordActivity extends BriarActivity
|
|||||||
newPasswordConfirmation.addTextChangedListener(tw);
|
newPasswordConfirmation.addTextChangedListener(tw);
|
||||||
newPasswordConfirmation.setOnEditorActionListener(this);
|
newPasswordConfirmation.setOnEditorActionListener(this);
|
||||||
changePasswordButton.setOnClickListener(this);
|
changePasswordButton.setOnClickListener(this);
|
||||||
|
|
||||||
if (state == null && currentPassword.requestFocus()) {
|
|
||||||
showSoftKeyboard(currentPassword);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -83,12 +83,6 @@ public class PasswordFragment extends BaseFragment implements TextWatcher {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
showSoftKeyboard(password);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count,
|
public void beforeTextChanged(CharSequence s, int start, int count,
|
||||||
int after) {
|
int after) {
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import static android.view.View.VISIBLE;
|
|||||||
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
|
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
|
||||||
import static org.briarproject.briar.android.util.UiUtils.enterPressed;
|
import static org.briarproject.briar.android.util.UiUtils.enterPressed;
|
||||||
import static org.briarproject.briar.android.util.UiUtils.hideSoftKeyboard;
|
import static org.briarproject.briar.android.util.UiUtils.hideSoftKeyboard;
|
||||||
import static org.briarproject.briar.android.util.UiUtils.showSoftKeyboard;
|
|
||||||
import static org.briarproject.briar.api.privategroup.PrivateGroupConstants.MAX_GROUP_NAME_LENGTH;
|
import static org.briarproject.briar.api.privategroup.PrivateGroupConstants.MAX_GROUP_NAME_LENGTH;
|
||||||
|
|
||||||
@MethodsNotNullByDefault
|
@MethodsNotNullByDefault
|
||||||
@@ -93,12 +92,6 @@ public class CreateGroupFragment extends BaseFragment {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
showSoftKeyboard(nameEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUniqueTag() {
|
public String getUniqueTag() {
|
||||||
return TAG;
|
return TAG;
|
||||||
|
|||||||
@@ -64,12 +64,6 @@ public abstract class BaseMessageFragment extends BaseFragment
|
|||||||
@StringRes
|
@StringRes
|
||||||
protected abstract int getHintText();
|
protected abstract int getHintText();
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
message.showSoftKeyboard();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
|||||||
@@ -37,6 +37,9 @@
|
|||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
||||||
|
<requestFocus/>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
<android.support.design.widget.TextInputLayout
|
<android.support.design.widget.TextInputLayout
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
android:inputType="text|textCapSentences"
|
android:inputType="text|textCapSentences"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
||||||
|
<requestFocus/>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -14,7 +14,11 @@
|
|||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
app:buttonText="@string/blogs_publish_blog_post"
|
app:buttonText="@string/blogs_publish_blog_post"
|
||||||
app:fillHeight="true"
|
app:fillHeight="true"
|
||||||
app:hint="@string/blogs_write_blog_post_body_hint"/>
|
app:hint="@string/blogs_write_blog_post_body_hint">
|
||||||
|
|
||||||
|
<requestFocus/>
|
||||||
|
|
||||||
|
</org.briarproject.briar.android.view.LargeTextInputView>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
android:inputType="text|textCapSentences"
|
android:inputType="text|textCapSentences"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
||||||
|
<requestFocus/>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
||||||
|
<requestFocus/>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
android:maxLines="1"/>
|
android:maxLines="1"/>
|
||||||
|
|
||||||
<requestFocus/>
|
<requestFocus/>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
android:maxLines="1">
|
android:maxLines="1">
|
||||||
|
|
||||||
<requestFocus/>
|
<requestFocus/>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputEditText>
|
</android.support.design.widget.TextInputEditText>
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user