Computer Knowledge

GUI and Web Frameworks

1,915 Questions

Graphical user interface and web frameworks involve layout management, directives, and application design across platforms like Android and Angular. These concepts are tested in computer science and IT officer competitive exams. Review these questions to understand UI components and coding standards.

Android layout attributesAngular structural directivesVB.Net web methodsJava Swing componentsSiebel application framework

GUI and Web Frameworks Questions

Multiple choice
  1. Only A

  2. Only B

  3. Both A and B

  4. Neither A nor B

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

ActionProvider is a new class available in Android 4.0. The action bar is a way to quickly add functionality to your application, while maintaining a native platform look and feel. Hence, both statements are correct.

Multiple choice
  1. 
    <activity> 
    android:name=”.SampleActivity” android:uiOptions=”splitActionBar”> 
    </activity>
    
  2. 
    <activity> android:name=”.SampleActivity” android:uiOptions=”splitActionBarWhenNarrow”> </activity>
    
  3. 
    <activity> android:name=”.SampleActivity” android:uiOptions=”splitActionBarNarrow”> </activity>
    
  4. <activity> android:name=”.SampleActivity” android:Options=”splitActionBarWhenNarrow”> </activity>
    
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To enable a split action bar on an activity, the code is:


android:name=”.SampleActivity” android:uiOptions=”splitActionBarWhenNarrow”> 

Multiple choice
  1.      Tab t1=bar.newTab();
          t1.setText("Tab Text&");
    
  2.     Tab t1=bar.newTab();
        t1.setTabListener(this);
    
  3.             Tab t1=bar.newTab();
                t1.setText("Tab Text");
                t1.setTabListener(this);
    
  4.            Tab t1=bar.newTab();
                t1.setText("Tab Text");
                t1.setTabListener(this);
                bar.addTab(bar.newTab());
    
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The code to add the tabs and their listeners to the action bar is as follows:

            t1.setText("Tab Text");
            t1.setTabListener(this);
            bar.addTab(bar.newTab());
Multiple choice
  1. Android:actionProviderClass=”android.widget.ShareActionProvider”
    
  2. Public void onCreate(Bundle bun1) {
     Super.onCreate(bun1);
     final ActionBar bar = getActionBar();
     bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    }
    
  3. Public void onCreate(Bundle bun1) {
     Super.onCreate(bun1);
     final ActionBar bar = getActionBar();
     bar.setNavigationMode(ActionBar.NAVIGATION_TABS);
    }
    
  4. Public void onCreate(Bundle bun1) {
     Super.onCreate(bun1);
     final ActionBar = getActionBar();
     bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    }
    
Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To create a tabbed interface, you have to set the navigation mode for the action bar in the onCreate method of your activity. The code is:

Public void onCreate(Bundle bun1) {
 Super.onCreate(bun1);
 final ActionBar bar = getActionBar();
 bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
Multiple choice
  1. For background task

  2. To provide a text window

  3. To provide a simple popup

  4. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A toast provides a simple popup.

Multiple choice
  1. To modify the application permissions

  2. To add media files(images)

  3. To change layout or graphical view

  4. To provide pointers to drawable, layout and values directory

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

AndroidManifest.xml present in res folder is used to modify the application permissions, activities and intent fillters.