This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TextView | |
android:id="@+id/label" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_centerHorizontal="true" | |
android:layout_centerVertical="true" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_below="@id/label" | |
android:layout_centerHorizontal="true" | |
android:onClick="lerQR" | |
android:text="@string/ler" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<string name="ler">Ler QR Code</string> | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Método que será chamado no clique do botão | |
* @param view | |
*/ | |
public void lerQR(View view){ | |
// Criamos um Intent com o caminho aplicativo que irá ler o QR code | |
Intent intent = new Intent("com.google.zxing.client.android.SCAN"); | |
// Passamos o parametro "SCAN_MODE" para ler somente códigos no formato QR | |
intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends Activity { | |
protected static final String ZXING_MARKET = "market://search?q=pname:com.google.zxing.client.android"; | |
protected static final String ZXING_DIRECT = "https://zxing.googlecode.com/files/BarcodeScanner3.1.apk"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onActivityResult(int requestCode, int resultCode, Intent intent) { | |
if (requestCode == 0 && resultCode == Activity.RESULT_OK) { | |
String qrcode = intent.getStringExtra("SCAN_RESULT"); | |
TextView label = (TextView) findViewById(R.id.label); | |
label.setText(qrcode); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE images | |
( | |
id bigserial, | |
nome character varying(100), | |
mime character varying(25), | |
img bytea, | |
dataupload timestamp without time zone | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="nav-container"> | |
<div class="nav"> | |
<ul> | |
<li><a href="">Home</a></li> | |
<li><a href="">CSS</a></li> | |
<li><a href="">PHP</a></li> | |
<li><a href="">SEO</a></li> | |
<li><a href="">jQuery</a></li> | |
<li><a href="">Wordpress</a></li> | |
<li><a href="">Services</a></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.nav-container{ background: url('images/nav_bg.jpg') repeat-x 0 0;} | |
.f-nav{ z-index: 9999; position: fixed; left: 0; top: 0; width: 100%;} /* isso vai fazer o menu ficar fixo no topo */ | |
.nav { height: 42px;} | |
.nav ul { list-style: none; } | |
.nav ul li{float: left; margin-top: 6px; padding: 6px; border-right: 1px solid #ACACAC;} | |
.nav ul li:first-child{ padding-left: 0;} | |
.nav ul li a { } | |
.nav ul li a:hover{ text-decoration: underline;} |
OlderNewer