Search in sources :

Example 11 with ScrollView

use of android.widget.ScrollView in project android_frameworks_base by ParanoidAndroid.

the class OneEditTextActivityNotSelected method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    LinearLayout layout = new LinearLayout(this);
    layout.setOrientation(LinearLayout.VERTICAL);
    mRootView = new ScrollView(this);
    EditText editText = new EditText(this);
    Button button = new Button(this);
    button.setText("The focus is here.");
    button.setFocusableInTouchMode(true);
    button.requestFocus();
    mDefaultFocusedView = button;
    layout.addView(button);
    layout.addView(editText);
    ((ScrollView) mRootView).addView(layout);
    setContentView(mRootView);
}
Also used : EditText(android.widget.EditText) ScrollView(android.widget.ScrollView) Button(android.widget.Button) LinearLayout(android.widget.LinearLayout)

Example 12 with ScrollView

use of android.widget.ScrollView in project android_frameworks_base by ParanoidAndroid.

the class BigCache method onCreate.

@Override
protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    final LinearLayout testBed = new LinearLayout(this);
    testBed.setOrientation(LinearLayout.VERTICAL);
    testBed.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
    final int cacheSize = ViewConfiguration.getMaximumDrawingCacheSize();
    final Display display = getWindowManager().getDefaultDisplay();
    final int screenWidth = display.getWidth();
    final int screenHeight = display.getHeight();
    final View tiny = new View(this);
    tiny.setId(R.id.a);
    tiny.setBackgroundColor(0xFFFF0000);
    tiny.setLayoutParams(new LinearLayout.LayoutParams(screenWidth, screenHeight));
    final View large = new View(this);
    large.setId(R.id.b);
    large.setBackgroundColor(0xFF00FF00);
    // Compute the height of the view assuming a cache size based on ARGB8888
    final int height = 2 * (cacheSize / 2) / screenWidth;
    large.setLayoutParams(new LinearLayout.LayoutParams(screenWidth, height));
    final ScrollView scroller = new ScrollView(this);
    scroller.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    testBed.addView(tiny);
    testBed.addView(large);
    scroller.addView(testBed);
    setContentView(scroller);
}
Also used : ScrollView(android.widget.ScrollView) ViewGroup(android.view.ViewGroup) ScrollView(android.widget.ScrollView) View(android.view.View) LinearLayout(android.widget.LinearLayout) Display(android.view.Display)

Example 13 with ScrollView

use of android.widget.ScrollView in project android_frameworks_base by ParanoidAndroid.

the class PhoneStatusBar method makeStatusBarView.

// ================================================================================
// Constructing the view
// ================================================================================
protected PhoneStatusBarView makeStatusBarView() {
    final Context context = mContext;
    Resources res = context.getResources();
    // populates mDisplayMetrics
    updateDisplaySize();
    loadDimens();
    mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size);
    mStatusBarWindow = (StatusBarWindowView) View.inflate(context, R.layout.super_status_bar, null);
    mStatusBarWindow.mService = this;
    mStatusBarWindow.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            if (event.getAction() == MotionEvent.ACTION_DOWN) {
                if (mExpandedVisible) {
                    animateCollapsePanels();
                }
            }
            return mStatusBarWindow.onTouchEvent(event);
        }
    });
    mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar);
    mStatusBarView.setStatusBar(this);
    mStatusBarView.setBar(this);
    mBarView = (ViewGroup) mStatusBarView;
    // status bar clock
    mClock = (Clock) mStatusBarView.findViewById(R.id.clock);
    PanelHolder holder = (PanelHolder) mStatusBarWindow.findViewById(R.id.panel_holder);
    mStatusBarView.setPanelHolder(holder);
    mNotificationPanel = (NotificationPanelView) mStatusBarWindow.findViewById(R.id.notification_panel);
    mNotificationPanel.setStatusBar(this);
    mNotificationPanelIsFullScreenWidth = (mNotificationPanel.getLayoutParams().width == ViewGroup.LayoutParams.MATCH_PARENT);
    // make the header non-responsive to clicks
    mNotificationPanel.findViewById(R.id.header).setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            // e eats everything
            return true;
        }
    });
    if (!ActivityManager.isHighEndGfx()) {
        mStatusBarWindow.setBackground(null);
        mNotificationPanel.setBackground(new FastColorDrawable(context.getResources().getColor(R.color.notification_panel_solid_background)));
    }
    if (ENABLE_INTRUDERS) {
        mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
        mIntruderAlertView.setVisibility(View.GONE);
        mIntruderAlertView.setBar(this);
    }
    if (MULTIUSER_DEBUG) {
        mNotificationPanelDebugText = (TextView) mNotificationPanel.findViewById(R.id.header_debug_info);
        mNotificationPanelDebugText.setVisibility(View.VISIBLE);
    }
    updateShowSearchHoldoff();
    try {
        boolean showNav = mWindowManagerService.hasNavigationBar();
        if (DEBUG)
            Slog.v(TAG, "hasNavigationBar=" + showNav);
        if (showNav && !mRecreating) {
            mNavigationBarView = (NavigationBarView) View.inflate(context, R.layout.navigation_bar, null);
            mNavigationBarView.setDisabledFlags(mDisabled);
            mNavigationBarView.setBar(this);
        }
    } catch (RemoteException ex) {
    // no window manager? good luck with that
    }
    // set recents activity navigation bar view
    RecentsActivity.addNavigationCallback(mNavigationBarView);
    // figure out which pixel-format to use for the status bar.
    mPixelFormat = PixelFormat.TRANSLUCENT;
    mSystemIconArea = (LinearLayout) mStatusBarView.findViewById(R.id.system_icon_area);
    mStatusIcons = (LinearLayout) mStatusBarView.findViewById(R.id.statusIcons);
    mNotificationIcons = (IconMerger) mStatusBarView.findViewById(R.id.notificationIcons);
    mMoreIcon = mStatusBarView.findViewById(R.id.moreIcon);
    mNotificationIcons.setOverflowIndicator(mMoreIcon);
    mStatusBarContents = (LinearLayout) mStatusBarView.findViewById(R.id.status_bar_contents);
    mTickerView = mStatusBarView.findViewById(R.id.ticker);
    mPile = (NotificationRowLayout) mStatusBarWindow.findViewById(R.id.latestItems);
    mPile.setLayoutTransitionsEnabled(false);
    mPile.setLongPressListener(getNotificationLongClicker());
    // was: expanded.findViewById(R.id.notificationLinearLayout);
    mExpandedContents = mPile;
    mNotificationPanelHeader = mStatusBarWindow.findViewById(R.id.header);
    mClearButton = mStatusBarWindow.findViewById(R.id.clear_all_button);
    mClearButton.setOnClickListener(mClearButtonListener);
    mClearButton.setAlpha(0f);
    mClearButton.setVisibility(View.GONE);
    mClearButton.setEnabled(false);
    mDateView = (DateView) mStatusBarWindow.findViewById(R.id.date);
    mHasSettingsPanel = res.getBoolean(R.bool.config_hasSettingsPanel);
    mHasFlipSettings = res.getBoolean(R.bool.config_hasFlipSettingsPanel);
    mDateTimeView = mNotificationPanelHeader.findViewById(R.id.datetime);
    if (mDateTimeView != null) {
        mDateTimeView.setOnClickListener(mClockClickListener);
        mDateTimeView.setEnabled(true);
    }
    mSettingsButton = (ImageView) mStatusBarWindow.findViewById(R.id.settings_button);
    if (mSettingsButton != null) {
        mSettingsButton.setOnClickListener(mSettingsButtonListener);
        if (mHasSettingsPanel) {
            if (mStatusBarView.hasFullWidthNotifications()) {
                // the settings panel is hiding behind this button
                mSettingsButton.setImageResource(R.drawable.ic_notify_quicksettings);
                mSettingsButton.setVisibility(View.VISIBLE);
            } else {
                // there is a settings panel, but it's on the other side of the (large) screen
                final View buttonHolder = mStatusBarWindow.findViewById(R.id.settings_button_holder);
                if (buttonHolder != null) {
                    buttonHolder.setVisibility(View.GONE);
                }
            }
        } else {
            // no settings panel, go straight to settings
            mSettingsButton.setVisibility(View.VISIBLE);
            mSettingsButton.setImageResource(R.drawable.ic_notify_settings);
        }
    }
    mHaloButton = (ImageView) mStatusBarWindow.findViewById(R.id.halo_button);
    if (mHaloButton != null) {
        mHaloButton.setOnClickListener(mHaloButtonListener);
        mHaloButtonVisible = true;
        updateHaloButton();
    }
    if (mHasFlipSettings) {
        mNotificationButton = (ImageView) mStatusBarWindow.findViewById(R.id.notification_button);
        if (mNotificationButton != null) {
            mNotificationButton.setOnClickListener(mNotificationButtonListener);
        }
    }
    mScrollView = (ScrollView) mStatusBarWindow.findViewById(R.id.scroll);
    // less drawing during pulldowns
    mScrollView.setVerticalScrollBarEnabled(false);
    if (!mNotificationPanelIsFullScreenWidth) {
        mScrollView.setSystemUiVisibility(View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER | View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS | View.STATUS_BAR_DISABLE_CLOCK);
    }
    mTicker = new MyTicker(context, mStatusBarView);
    TickerView tickerView = (TickerView) mStatusBarView.findViewById(R.id.tickerText);
    tickerView.mTicker = mTicker;
    if (mHaloActive)
        mTickerView.setVisibility(View.GONE);
    mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore);
    // set the inital view visibility
    setAreThereNotifications();
    // Other icons
    // will post a notification
    mLocationController = new LocationController(mContext);
    mBatteryController = new BatteryController(mContext);
    mBatteryController.addIconView((ImageView) mStatusBarView.findViewById(R.id.battery));
    mNetworkController = new NetworkController(mContext);
    mBluetoothController = new BluetoothController(mContext);
    mSignalCluster = (SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster);
    mNetworkController.addSignalCluster(mSignalCluster);
    mSignalCluster.setNetworkController(mNetworkController);
    mHasDockBattery = mContext.getResources().getBoolean(com.android.internal.R.bool.config_hasDockBattery);
    if (mHasDockBattery) {
        mDockBatteryController = new DockBatteryController(mContext);
        mDockBatteryController.addIconView((ImageView) mStatusBarView.findViewById(R.id.dock_battery));
    }
    final boolean isAPhone = mNetworkController.hasVoiceCallingFeature();
    if (isAPhone) {
        mEmergencyCallLabel = (TextView) mStatusBarWindow.findViewById(R.id.emergency_calls_only);
        if (mEmergencyCallLabel != null) {
            mNetworkController.addEmergencyLabelView(mEmergencyCallLabel);
            mEmergencyCallLabel.setOnClickListener(new View.OnClickListener() {

                public void onClick(View v) {
                }
            });
            mEmergencyCallLabel.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    updateCarrierLabelVisibility(false);
                }
            });
        }
    }
    mCarrierLabel = (TextView) mStatusBarWindow.findViewById(R.id.carrier_label);
    mShowCarrierInPanel = (mCarrierLabel != null);
    if (DEBUG)
        Slog.v(TAG, "carrierlabel=" + mCarrierLabel + " show=" + mShowCarrierInPanel);
    if (mShowCarrierInPanel) {
        mCarrierLabel.setVisibility(mCarrierLabelVisible ? View.VISIBLE : View.INVISIBLE);
        // for other devices, we show whatever network is connected
        if (mNetworkController.hasMobileDataFeature()) {
            mNetworkController.addMobileLabelView(mCarrierLabel);
        } else {
            mNetworkController.addCombinedLabelView(mCarrierLabel);
        }
        // set up the dynamic hide/show of the label
        mPile.setOnSizeChangedListener(new OnSizeChangedListener() {

            @Override
            public void onSizeChanged(View view, int w, int h, int oldw, int oldh) {
                updateCarrierLabelVisibility(false);
            }
        });
    }
    // Quick Settings (where available, some restrictions apply)
    if (mHasSettingsPanel) {
        // first, figure out where quick settings should be inflated
        final View settings_stub;
        if (mHasFlipSettings) {
            // a version of quick settings that flips around behind the notifications
            settings_stub = mStatusBarWindow.findViewById(R.id.flip_settings_stub);
            if (settings_stub != null) {
                mFlipSettingsView = ((ViewStub) settings_stub).inflate();
                mFlipSettingsView.setVisibility(View.GONE);
                mFlipSettingsView.setVerticalScrollBarEnabled(false);
            }
        } else {
            // full quick settings panel
            settings_stub = mStatusBarWindow.findViewById(R.id.quick_settings_stub);
            if (settings_stub != null) {
                mSettingsPanel = (SettingsPanelView) ((ViewStub) settings_stub).inflate();
            } else {
                mSettingsPanel = (SettingsPanelView) mStatusBarWindow.findViewById(R.id.settings_panel);
            }
            if (mSettingsPanel != null) {
                if (!ActivityManager.isHighEndGfx()) {
                    mSettingsPanel.setBackground(new FastColorDrawable(context.getResources().getColor(R.color.notification_panel_solid_background)));
                }
            }
        }
        // wherever you find it, Quick Settings needs a container to survive
        mSettingsContainer = (QuickSettingsContainerView) mStatusBarWindow.findViewById(R.id.quick_settings_container);
        // wherever you find it, Quick Settings needs a container to survive
        mSettingsContainer = (QuickSettingsContainerView) mStatusBarWindow.findViewById(R.id.quick_settings_container);
        if (mSettingsContainer != null) {
            mQS = new QuickSettingsController(mContext, mSettingsContainer, this);
            if (mSettingsPanel != null) {
                mSettingsPanel.setQuickSettings(mQS);
            }
            mQS.setService(this);
            mQS.setBar(mStatusBarView);
            mQS.setupQuickSettings();
            // Start observing for changes
            mTilesChangedObserver = new TilesChangedObserver(mHandler);
            mTilesChangedObserver.startObserving();
        } else {
            // fly away, be free
            mQS = null;
        }
    }
    mClingShown = !(DEBUG_CLINGS || !Prefs.read(mContext).getBoolean(Prefs.SHOWN_QUICK_SETTINGS_HELP, false));
    if (!ENABLE_NOTIFICATION_PANEL_CLING || ActivityManager.isRunningInTestHarness()) {
        mClingShown = true;
    }
    //        final ImageView wimaxRSSI =
    //                (ImageView)sb.findViewById(R.id.wimax_signal);
    //        if (wimaxRSSI != null) {
    //            mNetworkController.addWimaxIconView(wimaxRSSI);
    //        }
    // receive broadcasts
    IntentFilter filter = new IntentFilter();
    filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
    filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
    filter.addAction(Intent.ACTION_SCREEN_OFF);
    filter.addAction(Intent.ACTION_SCREEN_ON);
    context.registerReceiver(mBroadcastReceiver, filter);
    // listen for USER_SETUP_COMPLETE setting (per-user)
    resetUserSetupObserver();
    return mStatusBarView;
}
Also used : LocationController(com.android.systemui.statusbar.policy.LocationController) BluetoothController(com.android.systemui.statusbar.policy.BluetoothController) DockBatteryController(com.android.systemui.statusbar.policy.DockBatteryController) BatteryController(com.android.systemui.statusbar.policy.BatteryController) Context(android.content.Context) IntentFilter(android.content.IntentFilter) DockBatteryController(com.android.systemui.statusbar.policy.DockBatteryController) OnSizeChangedListener(com.android.systemui.statusbar.policy.OnSizeChangedListener) IntruderAlertView(com.android.systemui.statusbar.policy.IntruderAlertView) ImageView(android.widget.ImageView) DateView(com.android.systemui.statusbar.policy.DateView) View(android.view.View) TextView(android.widget.TextView) SignalClusterView(com.android.systemui.statusbar.SignalClusterView) StatusBarIconView(com.android.systemui.statusbar.StatusBarIconView) ScrollView(android.widget.ScrollView) Point(android.graphics.Point) MotionEvent(android.view.MotionEvent) NetworkController(com.android.systemui.statusbar.policy.NetworkController) ViewStub(android.view.ViewStub) Resources(android.content.res.Resources) RemoteException(android.os.RemoteException)

Example 14 with ScrollView

use of android.widget.ScrollView in project Rashr by DsLNeXuS.

the class RecoverySystemFragment method onCreateView.

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    mActivity = (RashrActivity) getActivity();
    final ScrollView root = (ScrollView) inflater.inflate(R.layout.fragment_recovery_system, container, false);
    mContext = root.getContext();
    final AppCompatTextView tvTitle = (AppCompatTextView) root.findViewById(R.id.tvSysName);
    tvTitle.setText(mTitle.toUpperCase());
    final AppCompatTextView tvDesc = (AppCompatTextView) root.findViewById(R.id.tvRecSysDesc);
    tvDesc.setText(mDesc);
    final AppCompatSpinner spVersions = (AppCompatSpinner) root.findViewById(R.id.spVersions);
    ArrayList<String> formatedVersions = new ArrayList<>();
    for (String versionLinks : mVersions) {
        formatedVersions.add(formatName(versionLinks, mTitle));
    }
    final ArrayAdapter<String> adapter = new ArrayAdapter<>(root.getContext(), android.R.layout.simple_list_item_1, formatedVersions);
    spVersions.setAdapter(adapter);
    spVersions.setSelection(0);
    final AppCompatTextView tvDev = (AppCompatTextView) root.findViewById(R.id.tvDevName);
    tvDev.setText(mDev);
    final AppCompatImageView imLogo = (AppCompatImageView) root.findViewById(R.id.ivRecLogo);
    if (mLogo == 0) {
        root.removeView(imLogo);
    } else {
        imLogo.setImageResource(mLogo);
    }
    final AppCompatButton bFlash = (AppCompatButton) root.findViewById(R.id.bFlashRecovery);
    bFlash.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            flashSupportedRecovery(mTitle, mVersions.get(spVersions.getSelectedItemPosition()));
        }
    });
    final LinearLayout ScreenshotLayout = (LinearLayout) root.findViewById(R.id.ScreenshotLayout);
    if (mScreenshotURL == null) {
        ((ViewGroup) ScreenshotLayout.getParent()).removeView(ScreenshotLayout);
    } else {
        try {
            Downloader jsonDownloader = new Downloader(new URL(mScreenshotURL + "/getScreenshots.php"), new File(mContext.getExternalCacheDir(), "screenhots.json"));
            jsonDownloader.setOverrideFile(true);
            jsonDownloader.setOnDownloadListener(new Downloader.OnDownloadListener() {

                @Override
                public void onSuccess(File file) {
                    try {
                        JSONArray arr = new JSONArray(Common.fileContent(file));
                        for (int i = 0; i < arr.length(); i++) {
                            final String name = arr.get(i).toString();
                            if (name.equals(".") || name.equals("..") || name.equals("getScreenshots.php"))
                                continue;
                            Downloader imageDownloader = new Downloader(new URL(mScreenshotURL + "/" + name), new File(file.getParentFile(), name));
                            //Do not redownload predownloaded images
                            imageDownloader.setOverrideFile(false);
                            imageDownloader.setOnDownloadListener(new Downloader.OnDownloadListener() {

                                @Override
                                public void onSuccess(File file) {
                                    AppCompatImageView iv = (AppCompatImageView) inflater.inflate(R.layout.recovery_screenshot, null);
                                    try {
                                        final BitmapFactory.Options options = new BitmapFactory.Options();
                                        options.inSampleSize = 8;
                                        Bitmap screenshot = BitmapFactory.decodeFile(file.toString());
                                        iv.setImageBitmap(screenshot);
                                        ScreenshotLayout.addView(iv);
                                    } catch (OutOfMemoryError e) {
                                        App.ERRORS.add("Screenshot " + file.toString() + " could not be decoded " + e.toString());
                                    }
                                }

                                @Override
                                public void onFail(Exception e) {
                                }
                            });
                            imageDownloader.download();
                        }
                    } catch (JSONException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        onFail(e);
                    }
                }

                @Override
                public void onFail(Exception e) {
                    e.printStackTrace();
                }
            });
            jsonDownloader.download();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    }
    return root;
}
Also used : MalformedURLException(java.net.MalformedURLException) ArrayList(java.util.ArrayList) Downloader(de.mkrtchyan.utils.Downloader) URL(java.net.URL) Bitmap(android.graphics.Bitmap) BitmapFactory(android.graphics.BitmapFactory) ViewGroup(android.view.ViewGroup) AppCompatTextView(android.support.v7.widget.AppCompatTextView) JSONArray(org.json.JSONArray) JSONException(org.json.JSONException) IOException(java.io.IOException) AppCompatImageView(android.support.v7.widget.AppCompatImageView) View(android.view.View) AppCompatImageView(android.support.v7.widget.AppCompatImageView) AppCompatTextView(android.support.v7.widget.AppCompatTextView) ScrollView(android.widget.ScrollView) AppCompatSpinner(android.support.v7.widget.AppCompatSpinner) JSONException(org.json.JSONException) MalformedURLException(java.net.MalformedURLException) IOException(java.io.IOException) AppCompatButton(android.support.v7.widget.AppCompatButton) ScrollView(android.widget.ScrollView) File(java.io.File) ArrayAdapter(android.widget.ArrayAdapter) LinearLayout(android.widget.LinearLayout)

Example 15 with ScrollView

use of android.widget.ScrollView in project android_frameworks_base by ResurrectionRemix.

the class InputTypeActivity method onCreate.

@Override
protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    mScrollView = new ScrollView(this);
    mLayout = new LinearLayout(this);
    mLayout.setOrientation(LinearLayout.VERTICAL);
    mLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    mInflater = getLayoutInflater();
    mParent = mLayout;
    /* Normal Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL, R.string.normal_edit_text_label));
    /* Normal Edit Text w/Cap Chars Flag*/
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL | EditorInfo.TYPE_TEXT_FLAG_CAP_CHARACTERS, R.string.cap_chars_edit_text_label));
    /* Normal Edit Text w/Cap Words Flag*/
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS, R.string.cap_words_edit_text_label));
    /* Normal Edit Text w/Cap Multiline Flag */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE, R.string.multiline_edit_text_label));
    /* Normal Edit Text w/Cap Sentences Flag */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES, R.string.cap_sentences_edit_text_label));
    /* Normal Edit Text w/Auto-complete Flag */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL | EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE, R.string.auto_complete_edit_text_label));
    /* Normal Edit Text w/Auto-correct Flag */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL | EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT, R.string.auto_correct_edit_text_label));
    /* Uri Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_URI, R.string.uri_edit_text_label));
    /* Email Address Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS, R.string.email_address_edit_text_label));
    /* Email Subject Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_SUBJECT, R.string.email_subject_edit_text_label));
    /* Email Content Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_LONG_MESSAGE, R.string.email_content_edit_text_label));
    /* Person Name Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME, R.string.person_name_edit_text_label));
    /* Postal Address Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_POSTAL_ADDRESS, R.string.postal_address_edit_text_label));
    /* Password Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_PASSWORD, R.string.password_edit_text_label));
    /* Web Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT, R.string.web_edit_text_label));
    /* Signed Number Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_FLAG_SIGNED, R.string.signed_number_edit_text_label));
    /* Decimal Number Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_FLAG_DECIMAL, R.string.decimal_number_edit_text_label));
    /* Phone Number Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_PHONE, R.string.phone_number_edit_text_label));
    /* Normal Datetime Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_DATETIME | EditorInfo.TYPE_DATETIME_VARIATION_NORMAL, R.string.normal_datetime_edit_text_label));
    /* Date Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_DATETIME | EditorInfo.TYPE_DATETIME_VARIATION_DATE, R.string.date_edit_text_label));
    /* Time Edit Text */
    mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_DATETIME | EditorInfo.TYPE_DATETIME_VARIATION_TIME, R.string.time_edit_text_label));
    mScrollView.addView(mLayout);
    setContentView(mScrollView);
}
Also used : ScrollView(android.widget.ScrollView) ViewGroup(android.view.ViewGroup) LinearLayout(android.widget.LinearLayout)

Aggregations

ScrollView (android.widget.ScrollView)366 View (android.view.View)173 TextView (android.widget.TextView)148 LinearLayout (android.widget.LinearLayout)93 ImageView (android.widget.ImageView)65 ViewGroup (android.view.ViewGroup)53 Button (android.widget.Button)36 EditText (android.widget.EditText)36 ListView (android.widget.ListView)29 AbsListView (android.widget.AbsListView)27 RecyclerView (android.support.v7.widget.RecyclerView)25 Intent (android.content.Intent)24 AdapterView (android.widget.AdapterView)24 GridLayout (android.widget.GridLayout)24 WebView (android.webkit.WebView)22 SuppressLint (android.annotation.SuppressLint)21 ArrayList (java.util.ArrayList)21 FrameLayout (android.widget.FrameLayout)19 Dialog (android.app.Dialog)16 DialogInterface (android.content.DialogInterface)16