Cannot display Android components in XML

when making a project on android studio it will automatically be created and provided with .java, .xml files and other supporting android projects. This will be compiled early by Gradle as an adjustment before being used by a programmer in editing the program. The “” file will automatically generate java script in the android studio editor, and also the “acitivty_main.xml” layout file that will be automatically generated as well. on android studio version 3.2.1, “activity_main.xml” that is formed will automatically provide 1 default container layout, Relative Layout, but for android studio version 3.8.1 the main default layout given is Constraint Layout. This is a little different in giving a default layout, where constraint layout has the characteristics of components that are in it must be precise with the parent layout. otherwise it will be considered an error. in version 3.8.1, components that have been selected and dragged down on the worksheet (form layout design) will usually not appear on the worksheet or the results of the preview, but can appear when compiled and displayed on the cellphone / emulator. this is assumed to be a bug in the android studio. The solution is to edit the “styles.xml” file (which is in the values ​​folder) and add the “Base” keyword to the syntax style, as below:


<! – Base application theme. ->

<style name = “AppTheme” parent = “Theme.AppCompat.Light.DarkActionBar”>



<! – Base application theme. ->

<style name = “AppTheme” parent = “Base.Theme.AppCompat.Light.DarkActionBar”>


Not Preview Component


Creating relationships table in the database for web laravel

Relation between a database is sometimes required to present an amalgamation of information in one table. For example, when it will make a report values for which data from several tables, and it is impossible and inefficient if it is made a new table to input their own values that should be derived from other tables.

Examples of application relation table:

  1. make a your own database (“db_student”).
  2. next, make table in database : (in the table “dosen” who became the primary key is a nip, and in the table “mahasiswa” who became the primary key is a nrp, and in the table “matakuliah” who became the primary key is a kode, and the last table “nilai” there is no primary key.


  3. fill of each table with a value.
  4. After finish all entry in table, now return to database and click SQL menu, and write this script :

    create view LaporanNilai as select mahasiswa.nrp, mahasiswa.nama, mahasiswa.jurusan, matakuliah.matakuliah, dosen.dosen, nilai.nilai, nilai.mutu from mahasiswa, matakuliah, dosen, nilai where nilai.nrp=mahasiswa.nrp and nilai.kode=matakuliah.kode and nilai.nip=dosen.nip;

  5. After finish and executed, it will be formed a view table and show a result from a relationships table.


Not Found Page in Laravel

After install laravel framework in computer, and launch it in browser, sometime we meet alittle error in laravel web page. Maybe like this error :

page error

page error

when we meet that error, maybe we don’t know how to fix it, because we believe our setting laravel is ok. when we check route.php is not problem, and we check controller is not problem too. The error page says, “Not Found” and never talk about error in our script code. After find a sollution in google, many sollution can be read about this error. Read one by one of the link reference that give a sollution of error, and try it to code to fix it.

First, the sollution give a direction to fix the .htaccess, open and edit it :

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder…
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller…
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

if .htaccess not gives a sollution….and try or add another sollution.

Second, the sollution give a direction to fix the httpd.conf in your web server :

<Directory “C:/wamp/www/laravel/sampleApp/”>
Options Indexes FollowSymLinks
Allowoverride All
Require all granted

add that code in the httpd.conf, if the httpd.conf already have default documentroot, it won’t take a effect in the process of initialize a documentroot.

After edit the httpd.conf, restart the apache, and refresh again your laravel web in browser. try click the link to open the page.

i hope it will work….

Use Listview and ListPicker

Now we will try another component from app inventor 2. There are listview and listpicker. Listview is like combo box in J2SE or spinner in app inventor 2. the function of listview is like spinner but it is not open another screen, it just in the same screen. if you want to catch a value from listview, you can get and view that in label. Different with spinner, spinner’s action can make basic interface is lock after the spinner is choose. About listpicker, when listpicker is click, there is a value that can be choosed in listpicker‘s screen. After choosed value, it will return to first listpicker button, and the value will be filled in that listpicker button. Here the example :

This slideshow requires JavaScript.

Here the block code :

  1. ListView

  2. ListPicker

    ListPicker Block


    Final Block ListPicker

  3. Slider

    Slider Block


    Final Slider Block

Try Spinner in app inventor 2

now, in this page… we will talk about spinner. in java dekstop (J2SE), spinner like combo box, the value answer can be choosed. After choose the answer, the value will be catched in the variable of spinner. In the previous page, we talk about if condition, the preview shows a view component especially spinner. so, in this page, we will view again that image to reader and add a new information properties of spinner. here the preview :


in the right side of screen1, there is a component’s widget that fill an structure of component and a spinner componen can view a properties if you click the spinner’s component (it shows in properties’s widget). The spinner value can fill in the “ElementsFromString” textfield. The value must be spaced with coma. In “Prompt” fill, it just give an information of spinner like header name of spinner.


Result in emulator :


Here the “Block” code :