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
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); | |
// Set up the ViewPager with the sections adapter. | |
mViewPager = (ViewPager) findViewById(R.id.container); | |
mViewPager.setAdapter(mSectionsPagerAdapter); |
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
<android.support.design.widget.TabLayout | |
android:id="@+id/tabs" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:tabMode="fixed" | |
app:tabGravity="fill"/> |
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
TabLayout tab = (TabLayout)findViewById(R.id.tabs); | |
tab.setupWithViewPager(mViewPager); |
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
{ | |
"userSecretsId": "aspnet5-MyWebApp-d857a31f-e7dc-4ad6-b479-0f403426db1a", | |
"version": "1.0.0-*", | |
"compilationOptions": { | |
"emitEntryPoint": true | |
}, | |
"dependencies": { | |
"EntityFramework.Commands": "7.0.0-rc1-final", | |
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", |
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 static string[] Projections = { "Id", "MemberId", "ClubId", "Type", "GoalValue" }; | |
string selection = "ClubId = '?' AND MemberId = '?'" ; | |
string[] selectionArg = { "0", "CN640521" }; | |
// executiing the query in contentprovider // | |
ContentResolver.Query(CONTENT_URI, GoalContentProvider.Projections, selection, selectionArg, null); |
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 QueryBuilder | |
{ | |
public static string buildQuery(string table, string[] projection, string selection, string[] selectionArgs, string sortOrder) | |
{ | |
StringBuilder builder = new StringBuilder("SELECT "); | |
builder.Append(string.Join(",", projection)); | |
builder.Append(" FROM " + table); | |
builder.Append(" WHERE "); | |
var regex = new Regex(Regex.Escape("?")); |
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"?> | |
<resources> | |
<declare-styleable name="GoalSetter"> | |
<attr name="Title" format="string"/> | |
</declare-styleable> | |
</resources> |
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
<xGauge.Controls.GoalSetter xmlns:customNS="http://schemas.android.com/apk/res/xGauge.xGauge" | |
android:id="@+id/clubVisit" | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
customNS:Title="New Customer" /> |
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
using System; | |
using Android.Content; | |
using Android.OS; | |
using Android.Views; | |
using Android.Widget; | |
using Android.Util; | |
using Android.Content.Res; | |
namespace xGauge.Controls | |
{ |
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
// Fire up pretty late | |
public GoalSetter(Context ctx, IAttributeSet attr) : base(ctx, attr) | |
{ | |
Init(); | |
TypedArray ta = this.Context.ObtainStyledAttributes(attr, Resource.Styleable.GoalSetter, 0, 0); | |
if (ta != null) | |
_externalTitle = ta.GetString(Resource.Styleable.GoalSetter_Title); | |
if (_externalTitle != null) |