@Test public void getTitle() throws Exception { window.setTitle("Some title"); assertThat(shadowOf(window).getTitle()).isEqualTo("Some title"); }
@Test public void getTitle_shouldReturnWindowTitle() throws Exception { Activity activity = Robolectric.buildActivity(Activity.class).create().get(); Window window = activity.getWindow(); window.setTitle("My Window Title"); assertThat(shadowOf(window).getTitle()).isEqualTo("My Window Title"); }
@Override public void setTitle(CharSequence title) { if (DEBUG) Log.d(TAG, "[setTitle] title: " + title); mActivity.getWindow().setTitle(title); }
@Override public void setTitle(CharSequence title) { if (ActionBarSherlock.DEBUG) Log.d(TAG, "[setTitle] title: " + title); mActivity.getWindow().setTitle(title); }
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.help_dialog_title)); view = inflater.inflate(R.layout.fragment_dialog_help, container, false); btnHelpDialog = (Button) view.findViewById(R.id.btnHelpDialog); btnHelpDialog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); return view; }
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.manage_select_keyboard)); activity = getActivity(); datasource = new LimeDB(this.activity); view = inflater.inflate(R.layout.fragment_dialog_keyboard, container, false); listSelectKeyboard = (ListView) view.findViewById(R.id.listSelectKeyboard); return view; }
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.action_news)); mLIMEPref = new LIMEPreferenceManager(getActivity()); view = inflater.inflate(R.layout.fragment_dialog_news, container, false); String html_value = mLIMEPref.getParameterString(Lime.LIME_NEWS_CONTENT, ""); if(!html_value.isEmpty()){ WebView newsContentArea = (WebView) view.findViewById(R.id.newsContentArea); newsContentArea.getSettings().setJavaScriptEnabled(true); newsContentArea.loadData(html_value, "text/html", "UTF-8"); } btnHelpDialog = (Button) view.findViewById(R.id.btnNewsDialog); btnHelpDialog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); return view; }
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.payment_dialog_title));
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.manage_word_dialog_add));
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.manage_related_dialog_add));
public void run() { if (timer != null) { getWindow().setTitle(timer.time()); //noinspection deprecation getWindow().setFeatureInt(Window.FEATURE_PROGRESS, puz.getPercentComplete() * 100); } if (runTimer) { handler.postDelayed(this, 1000); } } };
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.manage_word_dialog_edit));
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.manage_related_dialog_edit));
/** * Initialization of the Activity after it is first created. Must at least * call {@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_LEFT_ICON); // See assets/res/any/layout/dialog_activity.xml for this // view layout definition, which is being set here as // the content of our screen. setContentView(R.layout.dialog_activity); getWindow().setTitle("This is just a test"); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert); Button button = (Button)findViewById(R.id.add); button.setOnClickListener(mAddContentListener); button = (Button)findViewById(R.id.remove); button.setOnClickListener(mRemoveContentListener); }
/** * Initialization of the Activity after it is first created. Must at least * call {@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_LEFT_ICON); // See assets/res/any/layout/dialog_activity.xml for this // view layout definition, which is being set here as // the content of our screen. setContentView(R.layout.dialog_activity); getWindow().setTitle("This is just a test"); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert); Button button = (Button)findViewById(R.id.add); button.setOnClickListener(mAddContentListener); button = (Button)findViewById(R.id.remove); button.setOnClickListener(mRemoveContentListener); }
private void switchToSample() { getWindow().setTitle(getResources().getString(R.string.sample)); mListAdapter = new ActivityAdapter(); mListAdapter.register("AutoComplete", AutoCompleteActivity.class); mListAdapter.register("ConditionTest", ConditionActivity.class); mListAdapter.register("ReadWriteFile", RWFileActivity.class); mListAdapter.register("Fetch Ad", AdFetchActivity.class); mListAdapter.register("Group by", GroupByActivity.class); mListAdapter.register("Buffer", BufferActivity.class); mListAdapter.register("OtherAPI", OtherAPIActivity.class); mListView.setAdapter(mListAdapter); }
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.import_dialog_title)); datasource = new LimeDB(getActivity()); importdialog = this;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { getDialog().getWindow().setTitle(getResources().getString(R.string.share_dialog_title)); datasource = new LimeDB(getActivity()); sharedialog = this;
private void switchToApi() { getWindow().setTitle(getResources().getString(R.string.api)); mListAdapter = new ActivityAdapter(); mListAdapter.register("Async", AsyncActivity.class); mListAdapter.register("BlockingObservable", BlockingObservableActivity.class); mListAdapter.register("Combine", CombineActivity.class); mListAdapter.register("Condition", union.uc.com.rxjava_example.api.ConditionActivity.class); mListAdapter.register("ConnectableObserverable", ConnectableObservableActivity.class); mListAdapter.register("CustomeOperator", CustomeOperatorActivity.class); mListAdapter.register("ErrorHandler", ErrorHandleActivity.class); mListAdapter.register("Filter", FilterActivity.class); mListAdapter.register("Math & Aggregate", MathAggregateActivity.class); mListAdapter.register("ObservableCreate", ObservableCreateActivity.class); mListAdapter.register("Plugin", PluginActivity.class); mListAdapter.register("Scheduler", SchedulerActivity.class); mListAdapter.register("String", StringActivity.class); mListAdapter.register("Subject", SubjectActivity.class); mListAdapter.register("Transform", TransformationActivity.class); mListAdapter.register("Utility", UtilityActivity.class); mListAdapter.register("ReactiveStream", ReactiveStreamActivity.class); mListView.setAdapter(mListAdapter); }