Java Code Examples for org.telegram.messenger.AndroidUtilities#requestAdjustResize()

The following examples show how to use org.telegram.messenger.AndroidUtilities#requestAdjustResize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoginActivity.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void onResume()
{
    super.onResume();
    if (newAccount)
    {
        ConnectionsManager.getInstance(currentAccount).setAppPaused(false, false);
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    try
    {
        if (currentViewNum >= 1 && currentViewNum <= 4 && views[currentViewNum] instanceof LoginActivitySmsView)
        {
            int time = ((LoginActivitySmsView) views[currentViewNum]).openTime;
            if (time != 0 && Math.abs(System.currentTimeMillis() / 1000 - time) >= 24 * 60 * 60)
            {
                views[currentViewNum].onBackPressed();
                setPage(0, false, null, true);
            }
        }
    }
    catch (Exception e)
    {
        FileLog.e(e);
    }
}
 
Example 2
Source File: LoginActivity.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void onResume()
{
    super.onResume();
    if (newAccount)
    {
        ConnectionsManager.getInstance(currentAccount).setAppPaused(false, false);
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    try
    {
        if (currentViewNum >= 1 && currentViewNum <= 4 && views[currentViewNum] instanceof LoginActivitySmsView)
        {
            int time = ((LoginActivitySmsView) views[currentViewNum]).openTime;
            if (time != 0 && Math.abs(System.currentTimeMillis() / 1000 - time) >= 24 * 60 * 60)
            {
                views[currentViewNum].onBackPressed();
                setPage(0, false, null, true);
            }
        }
    }
    catch (Exception e)
    {
        FileLog.e(e);
    }
}
 
Example 3
Source File: ChannelEditInfoActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    if (textCell2 != null && info != null) {
        if (info.stickerset != null) {
            textCell2.setTextAndValue(LocaleController.getString("GroupStickers", R.string.GroupStickers), info.stickerset.title, false);
        } else {
            textCell2.setText(LocaleController.getString("GroupStickers", R.string.GroupStickers), false);
        }
    }
}
 
Example 4
Source File: ChannelCreateActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    if (nameTextView != null) {
        nameTextView.onResume();
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 5
Source File: ProxySettingsActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    clipboardManager.addPrimaryClipChangedListener(clipChangedListener);
    updatePasteCell();
}
 
Example 6
Source File: FilterUsersActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    if (editText != null) {
        editText.requestFocus();
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid, true);
}
 
Example 7
Source File: ChatRightsEditActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    if (listViewAdapter != null) {
        listViewAdapter.notifyDataSetChanged();
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 8
Source File: ThemeActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
    if (isOpen) {
        AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
        AndroidUtilities.setAdjustResizeToNothing(getParentActivity(), classGuid);
    }
}
 
Example 9
Source File: ChannelCreateActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    if (nameTextView != null) {
        nameTextView.onResume();
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 10
Source File: PollCreateActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    if (listAdapter != null) {
        listAdapter.notifyDataSetChanged();
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid, true);
}
 
Example 11
Source File: FilterUsersActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    if (editText != null) {
        editText.requestFocus();
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid, true);
}
 
Example 12
Source File: ProxySettingsActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    clipboardManager.addPrimaryClipChangedListener(clipChangedListener);
    updatePasteCell();
}
 
Example 13
Source File: ChatUsersActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    if (listViewAdapter != null) {
        listViewAdapter.notifyDataSetChanged();
    }
}
 
Example 14
Source File: TwoStepVerificationSetupActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    paused = false;
    if (passwordEditText != null && passwordEditText.getVisibility() == View.VISIBLE) {
        AndroidUtilities.runOnUIThread(() -> {
            if (passwordEditText != null) {
                passwordEditText.requestFocus();
                AndroidUtilities.showKeyboard(passwordEditText);
            }
        }, 200);
    }
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 15
Source File: ChannelEditInfoActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    if (textCell2 != null && info != null) {
        if (info.stickerset != null) {
            textCell2.setTextAndValue(LocaleController.getString("GroupStickers", R.string.GroupStickers), info.stickerset.title, false);
        } else {
            textCell2.setText(LocaleController.getString("GroupStickers", R.string.GroupStickers), false);
        }
    }
}
 
Example 16
Source File: ChatEditTypeActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
    if (textCell2 != null && info != null) {
        if (info.stickerset != null) {
            textCell2.setTextAndValue(LocaleController.getString("GroupStickers", R.string.GroupStickers), info.stickerset.title, false);
        } else {
            textCell2.setText(LocaleController.getString("GroupStickers", R.string.GroupStickers), false);
        }
    }
}
 
Example 17
Source File: ChangePhoneActivity.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 18
Source File: ChangePhoneActivity.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 19
Source File: ProxySettingsActivity.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onResume()
{
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
 
Example 20
Source File: ChangePhoneActivity.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onResume() {
    super.onResume();
    AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}