This file contains 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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 29 | |
buildToolsVersion "29.0.1" | |
defaultConfig { | |
applicationId "com.example.groupath" | |
minSdkVersion 19 | |
targetSdkVersion 29 | |
versionCode 1 |
This file contains 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
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
This file contains 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
<%= form_with(model: content, id: 'content_form', | |
data: {controller: 'image-upload', | |
target: 'image-upload.form', | |
action: 'ajax:beforeSend->image-upload#submit'}) do |form| %> | |
<div data-target="image-upload.imagePreviews"></div> | |
<%= form.file_field :photos, multiple: true, | |
accept: "image/*;capture=camera|library", | |
data: { action: "image-upload#multiImageDisplay" } %> |
This file contains 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
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.view.WindowManager; | |
public class MainActivity extends AppCompatActivity { | |
// ----------------------------------------------------------------------- | |
// Activity overrides | |
// ----------------------------------------------------------------------- |
This file contains 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 JsBridge { | |
private Context context; | |
public static android.webkit.CookieManager cookieManager = CookieManager.getInstance(); | |
public JsBridge(Context context){ | |
this.context = context; | |
} | |
@JavascriptInterface |
This file contains 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
<!-- Some form --> | |
<div data-controller="auto-grow-textarea"> | |
<%= form.text_area :body, cols: 20, row: 2, placeholder: 'Bir yorum yazın...', class:'form-control', data: { action: 'input->auto-grow-textarea#resize', target: 'auto-grow-textarea.input' } %> | |
</div> | |
<!-- Some form continued --> |
This file contains 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="row"> | |
<% photos.each_with_index do |photo, i| %> | |
<% if i == 0 %> | |
<%= render partial: 'image', locals: { image: image, col_length: 12, square: false }, cached: true %> | |
<% else %> | |
<%= render partial: 'image', locals: { image: image, col_length: 4, square: true }, cached: true %> | |
<% end %> | |
<% end %> | |
</div> |
This file contains 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 AppCompatActivity implements TurbolinksAdapter { | |
// Change the BASE_URL to an address that your VM or device can hit. | |
private static final String BASE_URL = "http://10.0.1.100:9292"; | |
private static final String INTENT_URL = "intentUrl"; | |
String tab1_path = "/tab1"; | |
String tab2_path = "/tab2"; | |
boolean tab1_is_visited = false; | |
boolean tab2_is_visited = false; |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:id="@+id/main_view"> | |
<com.google.android.material.floatingactionbutton.FloatingActionButton | |
android:id="@+id/notifications_button" |
This file contains 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 SomeActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.webview_in_drawer_layout); | |
// ... | |
DrawerLayout drawerLayout = findViewById(R.id.drawer_layout); | |
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( | |
this, drawerLayout, null, R.string.app_name, R.string.app_name); |
OlderNewer