###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:orientation="vertical" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:id="@+id/first_fragment_root"> | |
| <TextView android:layout_height="wrap_content" | |
| android:text="@string/text_first_fragment_title" | |
| android:layout_width="match_parent" |
| public class SampleFragment extends Fragment implements OnClickListener { | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, | |
| Bundle savedInstanceState) { | |
| View view = inflater.inflate(R.layout.sample_fragment,container, false); | |
| Button nextButton = (Button) view.findViewById(R.id.button_first); | |
| nextButton.setOnClickListener(this); | |
| return view; | |
| } |
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:orientation="vertical" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <fragment android:name="com.example.SimpleFragment" | |
| android:id="@+id/simplefragment" | |
| android:layout_weight="1" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" /> |
| FragmentManager fragmentManager = getFragmentManager() | |
| // Or: FragmentManager fragmentManager = getSupportFragmentManager() | |
| FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); | |
| SimpleFragment fragment = new SimpleFragment(); | |
| fragmentTransaction.add(R.id.fragment_container, fragment); | |
| fragmentTransaction.commit(); |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
| 1. Open the Terminal window | |
| 2. Type the command 'sudo nano open /private/etc/hosts' | |
| 3. Press the enter | |
| 4. It will prompt the sudo password | |
| 5. Enter the password | |
| 6. Its open the vim editer where you can modifiy and enter the new entry using control+ command. | |
| 7. The command will display at end of console. |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.drawable.Drawable; | |
| import android.support.v7.widget.AppCompatEditText; | |
| import android.util.AttributeSet; | |
| import android.util.SparseArray; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; |
| import android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| import android.os.Build; | |
| import android.util.AttributeSet; | |
| import android.view.Gravity; | |
| import android.widget.TextView; | |
| /** | |
| * Simple version used in the article: |
| https://github.com/umano/AndroidSlidingUpPanel/issues/113 | |
| //yes. include the sliding panel as a child of the drawer layout. | |
| https://github.com/umano/AndroidSlidingUpPanel/issues/271 |
| http://stackoverflow.com/questions/16660039/where-is-android-studio-layout-preview |